applied patch I got from Tim Janik for testing which fixes bug #101521.

2002-12-18  Michael Natterer  <mitch@gimp.org>

	* gobject/gtype.c (type_data_finalize_class_ifaces_Wm): applied
	patch I got from Tim Janik for testing which fixes bug #101521.
	(restart iterating the interface enties each time we finalized one
	because they might have been modified).
This commit is contained in:
Michael Natterer 2002-12-18 18:16:07 +00:00 committed by Michael Natterer
parent 40ffa7af98
commit 63f5a15fc6
2 changed files with 26 additions and 20 deletions

View File

@ -1,3 +1,10 @@
2002-12-18 Michael Natterer <mitch@gimp.org>
* gobject/gtype.c (type_data_finalize_class_ifaces_Wm): applied
patch I got from Tim Janik for testing which fixes bug #101521.
(restart iterating the interface enties each time we finalized one
because they might have been modified).
2002-12-17 Matthias Clasen <maclas@gmx.de> 2002-12-17 Matthias Clasen <maclas@gmx.de>
* gparam.c (g_param_spec_internal): Remove markup from doc * gparam.c (g_param_spec_internal): Remove markup from doc

View File

@ -1624,7 +1624,6 @@ type_class_init_Wm (TypeNode *node,
static void static void
type_data_finalize_class_ifaces_Wm (TypeNode *node) type_data_finalize_class_ifaces_Wm (TypeNode *node)
{ {
IFaceEntry *entry;
guint i; guint i;
g_assert (node->is_instantiatable && node->data && node->data->class.class && node->data->common.ref_count == 0); g_assert (node->is_instantiatable && node->data && node->data->class.class && node->data->common.ref_count == 0);
@ -1633,25 +1632,25 @@ type_data_finalize_class_ifaces_Wm (TypeNode *node)
type_descriptive_name_I (NODE_FUNDAMENTAL_TYPE (node)), type_descriptive_name_I (NODE_FUNDAMENTAL_TYPE (node)),
type_descriptive_name_I (NODE_TYPE (node))); type_descriptive_name_I (NODE_TYPE (node)));
for (entry = NULL, i = 0; i < CLASSED_NODE_N_IFACES (node); i++) reiterate:
if (CLASSED_NODE_IFACES_ENTRIES (node)[i].vtable && for (i = 0; i < CLASSED_NODE_N_IFACES (node); i++)
CLASSED_NODE_IFACES_ENTRIES (node)[i].vtable->g_instance_type == NODE_TYPE (node))
entry = CLASSED_NODE_IFACES_ENTRIES (node) + i;
while (entry)
{ {
if (!type_iface_vtable_finalize_Wm (lookup_type_node_I (entry->iface_type), node, entry->vtable)) IFaceEntry *entry = CLASSED_NODE_IFACES_ENTRIES (node) + i;
if (entry->vtable)
{ {
/* type_iface_vtable_finalize_Wm() doesn't modify write lock upon FALSE, if (type_iface_vtable_finalize_Wm (lookup_type_node_I (entry->iface_type), node, entry->vtable))
* iface vtable came from parent {
*/ /* refetch entries, IFACES_ENTRIES might be modified */
entry->vtable = NULL; goto reiterate;
}
else
{
/* type_iface_vtable_finalize_Wm() doesn't modify write lock upon FALSE,
* iface vtable came from parent
*/
entry->vtable = NULL;
}
} }
/* refetch entry, IFACES_ENTRIES might be modified */
for (entry = NULL, i = 0; i < CLASSED_NODE_N_IFACES (node); i++)
if (CLASSED_NODE_IFACES_ENTRIES (node)[i].vtable &&
CLASSED_NODE_IFACES_ENTRIES (node)[i].vtable->g_instance_type == NODE_TYPE (node))
entry = CLASSED_NODE_IFACES_ENTRIES (node) + i;
} }
} }