reverted a change to have an assert instead of a g_return_val_if_fail()
authorTim Janik <timj@gtk.org>
Mon, 2 Oct 2006 13:52:13 +0000 (13:52 +0000)
committerTim Janik <timj@src.gnome.org>
Mon, 2 Oct 2006 13:52:13 +0000 (13:52 +0000)
Mon Oct  2 15:50:16 2006  Tim Janik  <timj@gtk.org>

        * gvalue.c (g_value_peek_pointer): reverted a change to have an
        assert instead of a g_return_val_if_fail() here. libraries (and
        programs) should only ever g_assert or g_error if there is no way
        to carry on with the current program state. that's clearly not
        the case here.

        * ChangeLog: added missing changelog entry for 2003-12-30.

gobject/ChangeLog
gobject/gvalue.c

index 2811830..c25b3e2 100644 (file)
@@ -1,3 +1,13 @@
+Mon Oct  2 15:50:16 2006  Tim Janik  <timj@gtk.org>
+
+       * gvalue.c (g_value_peek_pointer): reverted a change to have an
+       assert instead of a g_return_val_if_fail() here. libraries (and
+       programs) should only ever g_assert or g_error if there is no way
+       to carry on with the current program state. that's clearly not 
+       the case here.
+
+       * ChangeLog: added missing changelog entry for 2003-12-30.
+
 Sat Sep 30 2006  Matthias Clasen  <mclasen@redhat.com>
 
        * pltcheck.sh: Script to check PLT entries.
@@ -922,6 +932,13 @@ Fri Jan  9 15:34:15 2004  Tim Janik  <timj@gtk.org>
        * gtype.h: added convenience macros G_IMPLEMENT_INTERFACE() and
        G_DEFINE_TYPE() plus variants.
 
+2003-12-30  Murray Cumming  <murrayc@usa.net>
+  
+        * gobject/glib-mkenums.in: Added a lowercase_name option, to be used
+        next to the enum declaration, where the flag option is already used,
+        when it is not possible to guess where to put the underscores in the
+        _get_type() function name, for instance for GNOMEVFSURIHide.
+
 Fri Dec 26 01:34:01 2003  Matthias Clasen  <maclas@gmx.de>
 
        * gtype.c (g_type_class_peek_parent): Don't acquire a read lock 
index f181ac2..75ea260 100644 (file)
@@ -178,7 +178,7 @@ g_value_peek_pointer (const GValue *value)
   value_table = g_type_value_table_peek (G_VALUE_TYPE (value));
   if (!value_table->value_peek_pointer)
     {
-      g_assert (g_value_fits_pointer (value) == TRUE);
+      g_return_val_if_fail (g_value_fits_pointer (value) == TRUE, NULL);
       return NULL;
     }