mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-28 13:12:10 +01:00
g_field_info_get_field: return correct pointer for C array
Also add a test case. https://bugzilla.gnome.org/show_bug.cgi?id=640468
This commit is contained in:
parent
1611ff77df
commit
eeddf77567
@ -193,6 +193,9 @@ g_field_info_get_field (GIFieldInfo *field_info,
|
||||
|
||||
if (g_type_info_is_pointer (type_info))
|
||||
{
|
||||
if (g_type_info_get_array_type (type_info) == GI_ARRAY_TYPE_C)
|
||||
value->v_pointer = G_STRUCT_MEMBER_P ((mem), (offset));
|
||||
else
|
||||
value->v_pointer = G_STRUCT_MEMBER (gpointer, mem, offset);
|
||||
result = TRUE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user