From f9b412e96d5618894158284289cf2a3fe6e7cbfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 7 Apr 2023 03:28:58 +0200 Subject: gimarshallingtests: Return new floating gvariant in transfer container Apply the logic of previous commit to the array gvariant container function, so that bindings can test better the memory handling of those cases. --- tests/gimarshallingtests.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c index 4c3889ea..fb300872 100644 --- a/tests/gimarshallingtests.c +++ b/tests/gimarshallingtests.c @@ -1856,7 +1856,8 @@ gi_marshalling_tests_array_gvariant_container_in (GVariant **variants) g_assert (variants[2] == NULL); container = g_new0 (GVariant *, 3); - container[0] = variants[0]; + /* This is a floating reference, so it's fine for transfer container */ + container[0] = g_variant_new_int32 (g_variant_get_int32 (variants[0])); container[1] = variants[1]; g_free (variants); -- cgit v1.2.1