+Sat Jun 10 08:38:27 2000 Tim Janik <timj@gtk.org>
+
+ * 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 <cher@suitware.com>.
+ (type_data_finalize_class_ifaces): same here, cut and paste
+ rulez.
+
Wed Jun 7 09:21:05 2000 Owen Taylor <otaylor@redhat.com>
* Makefile.am (INCLUDES): Add top_builddir so glibconfig.h
/* 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;
}
}
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;
}
}