mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
support setting gobjects and ginterfaces in struct fields
https://bugzilla.gnome.org/show_bug.cgi?id=644749
This commit is contained in:
parent
8304598583
commit
feedce8029
@ -512,6 +512,23 @@ g_field_info_set_field (GIFieldInfo *field_info,
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (g_type_info_get_tag (type_info))
|
||||
{
|
||||
case GI_TYPE_TAG_INTERFACE:
|
||||
{
|
||||
GIBaseInfo *interface = g_type_info_get_interface (type_info);
|
||||
switch (g_base_info_get_type (interface))
|
||||
{
|
||||
case GI_INFO_TYPE_OBJECT:
|
||||
case GI_INFO_TYPE_INTERFACE:
|
||||
G_STRUCT_MEMBER (gpointer, mem, offset) = (gpointer)value->v_pointer;
|
||||
result = TRUE;
|
||||
break;
|
||||
}
|
||||
g_base_info_unref ((GIBaseInfo *)interface);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_base_info_unref ((GIBaseInfo *)type_info);
|
||||
|
Loading…
Reference in New Issue
Block a user