mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 19:36:18 +01:00
Assume only that an array is embedded in a struct if it's fixed size
This commit is contained in:
parent
9948f518dc
commit
343c76431a
@ -193,8 +193,12 @@ g_field_info_get_field (GIFieldInfo *field_info,
|
|||||||
|
|
||||||
if (g_type_info_is_pointer (type_info))
|
if (g_type_info_is_pointer (type_info))
|
||||||
{
|
{
|
||||||
if (g_type_info_get_array_type (type_info) == GI_ARRAY_TYPE_C)
|
if (g_type_info_get_array_type (type_info) == GI_ARRAY_TYPE_C &&
|
||||||
|
g_type_info_get_array_fixed_size (type_info) >= 0)
|
||||||
|
{
|
||||||
|
/* Consider fixed-size arrays as embedded inside the struct */
|
||||||
value->v_pointer = G_STRUCT_MEMBER_P ((mem), (offset));
|
value->v_pointer = G_STRUCT_MEMBER_P ((mem), (offset));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
value->v_pointer = G_STRUCT_MEMBER (gpointer, mem, offset);
|
value->v_pointer = G_STRUCT_MEMBER (gpointer, mem, offset);
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user