From bd76d641067cfff4464b24ad37970585b55d13c1 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Fri, 26 Jul 2002 00:42:21 +0000 Subject: [PATCH] When adding ancestral prerequisites, add the grandparents, not the Thu Jul 25 20:34:39 2002 Owen Taylor * gtype.c (g_type_interface_add_prerequisite): When adding ancestral prerequisites, add the grandparents, not the siblings. (Problem found by Jon Trowbridge, patch from Dave Camp, #86879) --- gobject/ChangeLog | 7 +++++++ gobject/gtype.c | 11 +++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gobject/ChangeLog b/gobject/ChangeLog index d5f63ee..04cc7e5 100644 --- a/gobject/ChangeLog +++ b/gobject/ChangeLog @@ -1,3 +1,10 @@ +Thu Jul 25 20:34:39 2002 Owen Taylor + + * gtype.c (g_type_interface_add_prerequisite): When + adding ancestral prerequisites, add the grandparents, + not the siblings. (Problem found by Jon Trowbridge, patch from + Dave Camp, #86879) + 2002-07-05 Anders Carlsson * gobject.c (g_object_base_class_finalize): Remove debugging diff --git a/gobject/gtype.c b/gobject/gtype.c index 3cac593..21e7385 100644 --- a/gobject/gtype.c +++ b/gobject/gtype.c @@ -1202,13 +1202,12 @@ g_type_interface_add_prerequisite (GType interface_type, } else if (NODE_IS_IFACE (prerequisite_node)) { - GType *dependants; - guint n_dependants, i; + GType *prerequisites; + guint i; - dependants = iface_node_get_dependants_array_L (prerequisite_node); - n_dependants = dependants ? dependants[0] : 0; - for (i = 1; i <= n_dependants; i++) - type_iface_add_prerequisite_W (iface, lookup_type_node_I (dependants[i])); + prerequisites = IFACE_NODE_PREREQUISITES (prerequisite_node); + for (i = 0; i < IFACE_NODE_N_PREREQUISITES (prerequisite_node); i++) + type_iface_add_prerequisite_W (iface, lookup_type_node_I (prerequisites[i])); type_iface_add_prerequisite_W (iface, prerequisite_node); G_WRITE_UNLOCK (&type_rw_lock); } -- 2.7.4