Allow NULL to be cast to any type. (Frequently requested, most recently
authorOwen Taylor <otaylor@redhat.com>
Fri, 22 Nov 2002 03:03:15 +0000 (03:03 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Fri, 22 Nov 2002 03:03:15 +0000 (03:03 +0000)
Thu Nov 21 16:05:50 2002  Owen Taylor  <otaylor@redhat.com>

        * gtype.c (g_type_check_instance_cast): Allow
        NULL to be cast to any type. (Frequently requested,
        most recently #99023, Lars Clausen.)

gobject/ChangeLog
gobject/gtype.c

index 31df69310ed83a6387a05f814f471d3284f60046..f9ecc08dcc08bfd77105e2f9183c7f47a08c3207 100644 (file)
@@ -1,3 +1,9 @@
+Thu Nov 21 16:05:50 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
  
        * gtype.c gsignal.c gvaluearray.c: Include config.h
index d299f51c08b7e53170c2933b3210369b226ac2f1..14afc21e938b876c75963a483404cf956907f7dc 100644 (file)
@@ -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;
 }