If we have a <lookup name="foo" type="SomeInterface"> a runtime warning
would be emitted and the expression would fail to be created. This is
because the interfaces will likely be a GObject as well, meaning we check
the object type branch instead of the interface.
Instead, we need to use the fundamental type like other parts of the
expression system use.
return NULL;
}
- if (g_type_is_a (type, G_TYPE_OBJECT))
+ if (g_type_fundamental (type) == G_TYPE_OBJECT)
{
GObjectClass *class = g_type_class_ref (type);
pspec = g_object_class_find_property (class, info->property.property_name);
g_type_class_unref (class);
}
- else if (g_type_is_a (type, G_TYPE_INTERFACE))
+ else if (g_type_fundamental (type) == G_TYPE_INTERFACE)
{
GTypeInterface *iface = g_type_default_interface_ref (type);
pspec = g_object_interface_find_property (iface, info->property.property_name);