mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-01 02:10:07 +02:00
Make g_type_interface_prerequisites() only return one instantiable type
Previously, the code had a heisenbug and could potentially return superclasses, too. In fact, it was based on the behavior of malloc. https://bugzilla.redhat.com/show_bug.cgi?id=554678
This commit is contained in:
parent
9fdbae9344
commit
63a6666ab7
@ -1622,9 +1622,11 @@ g_type_interface_prerequisites (GType interface_type,
|
||||
{
|
||||
GType prerequisite = IFACE_NODE_PREREQUISITES (iface)[i];
|
||||
TypeNode *node = lookup_type_node_I (prerequisite);
|
||||
if (node->is_instantiatable &&
|
||||
(!inode || type_node_is_a_L (node, inode)))
|
||||
inode = node;
|
||||
if (node->is_instantiatable)
|
||||
{
|
||||
if (!inode || type_node_is_a_L (node, inode))
|
||||
inode = node;
|
||||
}
|
||||
else
|
||||
types[n++] = NODE_TYPE (node);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user