From: Owen Taylor Date: Sat, 17 Nov 2001 23:23:01 +0000 (+0000) Subject: Get rid fo g_log_domain_glib variable in favor of just using a string X-Git-Tag: GOBJECT_GType_guint~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f1019c04fc06e90d4eeacad6122445314f1df5da;p=platform%2Fupstream%2Fglib.git Get rid fo g_log_domain_glib variable in favor of just using a string Sat Nov 17 17:21:57 2001 Owen Taylor * glib/Makefile.am glib/*.c glib/gmessages.h: Get rid fo g_log_domain_glib variable in favor of just using a string constant. --- diff --git a/glib/Makefile.am b/glib/Makefile.am index d5b627f..1b55f26 100644 --- a/glib/Makefile.am +++ b/glib/Makefile.am @@ -2,7 +2,7 @@ SUBDIRS=libcharset -INCLUDES = -I$(top_srcdir) -DG_LOG_DOMAIN=g_log_domain_glib \ +INCLUDES = -I$(top_srcdir) -DG_LOG_DOMAIN=\"GLib\" \ @GLIB_DEBUG_FLAGS@ -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION EXTRA_DIST = \ diff --git a/glib/gmem.c b/glib/gmem.c index f2a27a3..7329aee 100644 --- a/glib/gmem.c +++ b/glib/gmem.c @@ -1044,7 +1044,7 @@ g_mem_chunk_print (GMemChunk *mem_chunk) mem_areas = mem_areas->next; } - g_log (g_log_domain_glib, G_LOG_LEVEL_INFO, + g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "%s: %ld bytes using %d mem areas", mem_chunk->name, mem, mem_chunk->num_mem_areas); } @@ -1065,7 +1065,7 @@ g_mem_chunk_info (void) } g_mutex_unlock (mem_chunks_lock); - g_log (g_log_domain_glib, G_LOG_LEVEL_INFO, "%d mem chunks", count); + g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "%d mem chunks", count); g_mutex_lock (mem_chunks_lock); mem_chunk = mem_chunks; diff --git a/glib/gmessages.c b/glib/gmessages.c index 0457bfd..6781ed0 100644 --- a/glib/gmessages.c +++ b/glib/gmessages.c @@ -80,7 +80,6 @@ static gsize printf_string_upper_bound (const gchar *format, static GMutex* g_messages_lock = NULL; -const gchar *g_log_domain_glib = "GLib"; static GLogDomain *g_log_domains = NULL; static GLogLevelFlags g_log_always_fatal = G_LOG_FATAL_MASK; static GPrintFunc glib_print_func = NULL; diff --git a/glib/gmessages.h b/glib/gmessages.h index 9fc556f..31550a3 100644 --- a/glib/gmessages.h +++ b/glib/gmessages.h @@ -71,7 +71,6 @@ typedef void (*GLogFunc) (const gchar *log_domain, /* Logging mechanism */ -GLIB_VAR const gchar *g_log_domain_glib; guint g_log_set_handler (const gchar *log_domain, GLogLevelFlags log_levels, GLogFunc log_func, diff --git a/glib/grel.c b/glib/grel.c index 189eee4..92cd822 100644 --- a/glib/grel.c +++ b/glib/grel.c @@ -404,7 +404,7 @@ g_relation_print_one (gpointer tuple_key, } g_string_append (gstring, "]"); - g_log (g_log_domain_glib, G_LOG_LEVEL_INFO, gstring->str); + g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, gstring->str); g_string_free (gstring, TRUE); } @@ -416,7 +416,7 @@ g_relation_print_index (gpointer tuple_key, GRelation* rel = (GRelation*) user_data; GHashTable* table = (GHashTable*) tuple_value; - g_log (g_log_domain_glib, G_LOG_LEVEL_INFO, "*** key %p", tuple_key); + g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "*** key %p", tuple_key); g_hash_table_foreach (table, g_relation_print_one, @@ -428,7 +428,7 @@ g_relation_print (GRelation *relation) { gint i; - g_log (g_log_domain_glib, G_LOG_LEVEL_INFO, "*** all tuples (%d)", relation->count); + g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "*** all tuples (%d)", relation->count); g_hash_table_foreach (relation->all_tuples, g_relation_print_one, @@ -439,7 +439,7 @@ g_relation_print (GRelation *relation) if (relation->hashed_tuple_tables[i] == NULL) continue; - g_log (g_log_domain_glib, G_LOG_LEVEL_INFO, "*** index %d", i); + g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "*** index %d", i); g_hash_table_foreach (relation->hashed_tuple_tables[i], g_relation_print_index, diff --git a/glib/gtree.c b/glib/gtree.c index 5b0406b..a5737f8 100644 --- a/glib/gtree.c +++ b/glib/gtree.c @@ -1054,7 +1054,7 @@ g_tree_node_check (GTreeNode *node) balance = right_height - left_height; if (balance != node->balance) - g_log (g_log_domain_glib, G_LOG_LEVEL_INFO, + g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "g_tree_node_check: failed: %d ( %d )\n", balance, node->balance);