Commit 8fb3bb49 authored by zb3's avatar zb3

Fix the number of "to python" child arguments when the array length argument is shared. Fixes #366

When the arg cache already exists, we still need to increment n_to_py_child_args if this is an output argument.
parent 15ae6328
Pipeline #125803 passed with stages
in 6 minutes and 58 seconds
......@@ -848,20 +848,20 @@ pygi_arg_garray_len_arg_setup (PyGIArgCache *arg_cache,
callable_cache->to_py_args =
g_slist_remove (callable_cache->to_py_args, child_cache);
}
/* This is a case where the arg cache already exists and has been
* setup by another array argument sharing the same length argument.
* See: gi_marshalling_tests_multi_array_key_value_in
*/
if (child_cache->meta_type == PYGI_META_ARG_TYPE_CHILD)
return child_cache;
}
/* There is a length argument for this array, so increment the number
* of "to python" child arguments when applicable.
*/
if (direction & PYGI_DIRECTION_TO_PYTHON)
callable_cache->n_to_py_child_args++;
callable_cache->n_to_py_child_args++;
/* This is a case where the arg cache already exists and has been
* setup by another array argument sharing the same length argument.
* See: gi_marshalling_tests_multi_array_key_value_in
*/
if (child_cache->meta_type == PYGI_META_ARG_TYPE_CHILD)
return child_cache;
child_cache->meta_type = PYGI_META_ARG_TYPE_CHILD;
child_cache->direction = direction;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment