Add an assert to make it clear when value can be NULL.
authorMatthias Clasen <mclasen@redhat.com>
Wed, 12 Apr 2006 15:38:27 +0000 (15:38 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 12 Apr 2006 15:38:27 +0000 (15:38 +0000)
2006-04-12  Matthias Clasen  <mclasen@redhat.com>

* glib/goption.c (parse_arg): Add an assert to make it
clear when value can be NULL.

ChangeLog
ChangeLog.pre-2-12
glib/goption.c

index b9e5e78..0ef48fc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-04-12  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/goption.c (parse_arg): Add an assert to make it
+       clear when value can be NULL.
+
 2006-04-07  Martyn Russell  <martyn@imendio.com>
 
        * tests/threadpool-test.c: (test_thread_stop_unused): Removed an
index b9e5e78..0ef48fc 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-12  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/goption.c (parse_arg): Add an assert to make it
+       clear when value can be NULL.
+
 2006-04-07  Martyn Russell  <martyn@imendio.com>
 
        * tests/threadpool-test.c: (test_thread_stop_unused): Removed an
index f85c8f5..446b6e3 100644 (file)
@@ -767,7 +767,9 @@ parse_arg (GOptionContext *context,
      
 {
   Change *change;
-  
+
+  g_assert (value || OPTIONAL_ARG (entry) || NO_ARG (entry));
+
   switch (entry->arg)
     {
     case G_OPTION_ARG_NONE: