Skip to content

arg: Fix the marshalling of GPtrArrays by ensuring that their elements are...

When marshalling GPtrArrays of GI_INFO_TYPE_STRUCT such as NMIPAddress, GPtrArrays are considered as arrays of structures instead of arrays of pointers, with both info_type == GI_INFO_TYPE_STRUCT and !g_type_info_is_pointer(param_info) being true.

One way of fixing this issue is to consider the array type in gjs_array_from_carray_internal() so that we can avoid treating array elements as structures instead of pointers when the array is a GPtrArray.

Unfortunately it does not look like tests can easily be added to cover this fix, without having to add new functions in https://gitlab.gnome.org/GNOME/gobject-introspection/blob/1.60.1/tests/gimarshallingtests.c.

More details on this have been posted in #9 (comment 528382).

Closes #9 (closed).

Edited by Stéphane Seng

Merge request reports