fetch the nth iface entry of the type node in the nth loop iteration, not

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.
This commit is contained in:
Tim Janik 2000-06-10 06:41:55 +00:00 committed by Tim Janik
parent ac0c2c1c5a
commit 5ff84de0df
2 changed files with 18 additions and 10 deletions

View File

@ -1,3 +1,11 @@
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

View File

@ -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;
}
}
@ -1040,7 +1040,7 @@ type_data_finalize_class_ifaces (TypeNode *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);
@ -1048,7 +1048,7 @@ type_data_finalize_class_ifaces (TypeNode *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;
}
}