g_type_default_interface_ref() was not ensuring working g_signal_list_ids.
authorCody Russell <bratsche@gnome.org>
Tue, 14 Aug 2007 22:55:23 +0000 (22:55 +0000)
committerCody Russell <bratsche@src.gnome.org>
Tue, 14 Aug 2007 22:55:23 +0000 (22:55 +0000)
2007-08-14  Cody Russell  <bratsche@gnome.org>

        * gobject/gsignal.c: g_type_default_interface_ref() was not
        ensuring working g_signal_list_ids.  Added checks for
        !G_TYPE_IS_INTERFACE (itype).
        (#465625, by some guy who calls himself Yeti)

svn path=/trunk/; revision=5704

ChangeLog
gobject/gsignal.c

index 37295d5..13e200e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-08-14  Cody Russell  <bratsche@gnome.org>
+
+       * gobject/gsignal.c: g_type_default_interface_ref() was not
+       ensuring working g_signal_list_ids.  Added checks for
+       !G_TYPE_IS_INTERFACE (itype).
+       (#465625, by some guy who calls himself Yeti)
+
 Tue Aug 14 02:06:10 2007  Tim Janik  <timj@imendio.com>
 
        * glib/gthread.c (g_once_init_enter_impl): prevent race covered
index c65565a..8ce1b6c 100644 (file)
@@ -1058,10 +1058,10 @@ g_signal_list_ids (GType  itype,
       if (!g_type_name (itype))
        g_warning (G_STRLOC ": unable to list signals for invalid type id `%lu'",
                   itype);
-      else if (!G_TYPE_IS_INSTANTIATABLE (itype))
+      else if (!G_TYPE_IS_INSTANTIATABLE (itype) && !G_TYPE_IS_INTERFACE (itype))
        g_warning (G_STRLOC ": unable to list signals of non instantiatable type `%s'",
                   g_type_name (itype));
-      else if (!g_type_class_peek (itype))
+      else if (!g_type_class_peek (itype) && !G_TYPE_IS_INTERFACE (itype))
        g_warning (G_STRLOC ": unable to list signals of unloaded type `%s'",
                   g_type_name (itype));
     }