diff --git a/gobject/ChangeLog b/gobject/ChangeLog index e2ab9c5f7..2c6c31840 100644 --- a/gobject/ChangeLog +++ b/gobject/ChangeLog @@ -1,3 +1,11 @@ +Sat Jun 10 08:38:27 2000 Tim Janik + + * gtype.c (type_class_init): fetch the nth iface entry of the + type node in the nth loop iteration, not alwys the first. + bug discovered by Walt Pohl . + (type_data_finalize_class_ifaces): same here, cut and paste + rulez. + Wed Jun 7 09:21:05 2000 Owen Taylor * Makefile.am (INCLUDES): Add top_builddir so glibconfig.h diff --git a/gobject/gtype.c b/gobject/gtype.c index 1b6a313d1..b00e58b41 100644 --- a/gobject/gtype.c +++ b/gobject/gtype.c @@ -1014,14 +1014,14 @@ type_class_init (TypeNode *node, /* ok, we got the class done, now initialize all interfaces */ for (entry = NULL, i = 0; i < node->n_ifaces; i++) if (!node->private.iface_entries[i].vtable) - entry = node->private.iface_entries; + entry = node->private.iface_entries + i; while (entry) { type_iface_vtable_init (LOOKUP_TYPE_NODE (entry->iface_type), node); - + for (entry = NULL, i = 0; i < node->n_ifaces; i++) if (!node->private.iface_entries[i].vtable) - entry = node->private.iface_entries; + entry = node->private.iface_entries + i; } } @@ -1036,19 +1036,19 @@ type_data_finalize_class_ifaces (TypeNode *node) g_message ("finalizing interfaces for %sClass `%s'", type_descriptive_name (G_TYPE_FUNDAMENTAL (NODE_TYPE (node))), type_descriptive_name (NODE_TYPE (node))); - + for (entry = NULL, i = 0; i < node->n_ifaces; i++) if (node->private.iface_entries[i].vtable && node->private.iface_entries[i].vtable->g_instance_type == NODE_TYPE (node)) - entry = node->private.iface_entries; + entry = node->private.iface_entries + i; while (entry) { type_iface_vtable_finalize (LOOKUP_TYPE_NODE (entry->iface_type), node, entry->vtable); - - for (entry = NULL, i = 0; i < node->n_ifaces; i++) - if (node->private.iface_entries[i].vtable && - node->private.iface_entries[i].vtable->g_instance_type == NODE_TYPE (node)) - entry = node->private.iface_entries; + + for (entry = NULL, i = 0; i < node->n_ifaces; i++) + if (node->private.iface_entries[i].vtable && + node->private.iface_entries[i].vtable->g_instance_type == NODE_TYPE (node)) + entry = node->private.iface_entries + i; } }