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 31df693..f9ecc08 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 d299f51..14afc21 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;
 }