From: Behdad Esfahbod Date: Sat, 29 Nov 2008 01:40:38 +0000 (+0000) Subject: Bug 562639 – g_parse_debug_flags() parsing "help" X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=5d5526c1a3ced245bdca159db4840e48971a0469;p=dana%2Fcg-glib.git Bug 562639 – g_parse_debug_flags() parsing "help" 2008-11-28 Behdad Esfahbod Bug 562639 – g_parse_debug_flags() parsing "help" * glib/gutils.c (g_parse_debug_string): Print available keys if string is "help". svn path=/trunk/; revision=7710 --- diff --git a/ChangeLog b/ChangeLog index 031dee68..a1549684 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-11-28 Behdad Esfahbod + + Bug 562639 – g_parse_debug_flags() parsing "help" + + * glib/gutils.c (g_parse_debug_string): Print available keys if + string is "help". + 2008-11-28 Behdad Esfahbod Bug 562638 – GDebugKey key member should be const diff --git a/glib/gutils.c b/glib/gutils.c index d5407cae..4ce96549 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -615,7 +615,7 @@ debug_key_matches (const gchar *key, /** * g_parse_debug_string: * @string: a list of debug options separated by colons, spaces, or - * commas; or the string "all" to set all flags, or %NULL. + * commas, or %NULL. * @keys: pointer to an array of #GDebugKey which associate * strings with bit flags. * @nkeys: the number of #GDebugKeys in the array. @@ -625,6 +625,10 @@ debug_key_matches (const gchar *key, * within GDK and GTK+ to parse the debug options passed on the * command line or through environment variables. * + * If @string is equal to "all", all flags are set. If @string + * is equal to "help", all the available keys in @keys are printed + * out to standard error. + * * Returns: the combined set of bit flags. */ guint @@ -648,6 +652,14 @@ g_parse_debug_string (const gchar *string, for (i=0; i