From: Owen Taylor Date: Fri, 22 Nov 2002 03:03:15 +0000 (+0000) Subject: Allow NULL to be cast to any type. (Frequently requested, most recently X-Git-Tag: GLIB_2_1_3~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=892675e05a940aa8c9165f4c3e0dbd7c5d4e21a4;p=platform%2Fupstream%2Fglib.git Allow NULL to be cast to any type. (Frequently requested, most recently Thu Nov 21 16:05:50 2002 Owen Taylor * gtype.c (g_type_check_instance_cast): Allow NULL to be cast to any type. (Frequently requested, most recently #99023, Lars Clausen.) --- diff --git a/gobject/ChangeLog b/gobject/ChangeLog index 31df693..f9ecc08 100644 --- a/gobject/ChangeLog +++ b/gobject/ChangeLog @@ -1,3 +1,9 @@ +Thu Nov 21 16:05:50 2002 Owen Taylor + + * gtype.c (g_type_check_instance_cast): Allow + NULL to be cast to any type. (Frequently requested, + most recently #99023, Lars Clausen.) + Mon Nov 4 14:42:36 2002 Owen Taylor * gtype.c gsignal.c gvaluearray.c: Include config.h diff --git a/gobject/gtype.c b/gobject/gtype.c index d299f51..14afc21 100644 --- a/gobject/gtype.c +++ b/gobject/gtype.c @@ -2715,9 +2715,6 @@ g_type_check_instance_cast (GTypeInstance *type_instance, g_warning ("invalid unclassed pointer in cast to `%s'", type_descriptive_name_I (iface_type)); } - else - g_warning ("invalid cast from (NULL) pointer to `%s'", - type_descriptive_name_I (iface_type)); return type_instance; }