Allow NULL to be cast to any type. (Frequently requested, most recently

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.)
This commit is contained in:
Owen Taylor 2002-11-22 03:03:15 +00:00 committed by Owen Taylor
parent a436817718
commit 892675e05a
2 changed files with 6 additions and 3 deletions

View 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

View 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;
}