eina: use a global variable to hold the same string accross other library.
authorCedric BAIL <cedric.bail@samsung.com>
Fri, 29 Mar 2013 02:44:48 +0000 (11:44 +0900)
committerCedric BAIL <cedric.bail@samsung.com>
Fri, 29 Mar 2013 02:44:48 +0000 (11:44 +0900)
src/lib/eina/eina_log.c
src/lib/eina/eina_log.h

index e66e57e..5e39de6 100644 (file)
@@ -101,6 +101,9 @@ struct _Eina_Log_Timing
    Eina_Log_State state;
 };
 
+EAPI const char *_eina_log_state_init = "init";
+EAPI const char *_eina_log_state_shutdown = "shutdown";
+
 /*
  * List of levels for domains set by the user before the domains are registered,
  * updates the domain levels on the first log and clears itself.
index 40bc3fb..a54b67b 100644 (file)
@@ -941,8 +941,11 @@ EAPI void eina_log_print_cb_journald(const Eina_Log_Domain *d,
 EAPI void eina_log_console_color_set(FILE *fp,
                                      const char *color) EINA_ARG_NONNULL(1, 2);
 
-#define EINA_LOG_STATE_INIT "init"
-#define EINA_LOG_STATE_SHUTDOWN "shutdown"
+extern EAPI const char *_eina_log_state_init;
+extern EAPI const char *_eina_log_state_shutdown;
+
+#define EINA_LOG_STATE_INIT _eina_log_state_init
+#define EINA_LOG_STATE_SHUTDOWN _eina_log_state_shutdown
 
 /**
  * @brief Start or stop the timing of a phase.