glib-genmarshal: Fix ref-sinking of GVariants in valist marshallers

The old (Perl) implementation of glib-genmarshal used
g_variant_ref_sink() to correctly handle floating inputs; the Python
version should do the same.

Backported version of !904 does not include the unit test. The version
of this on `master` includes a unit test.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1793
This commit is contained in:
Philip Withnall
2019-06-08 00:10:07 +01:00
parent dbd8193a87
commit f843ba8c44

View File

@@ -360,7 +360,7 @@ IN_ARGS = {
'signal': 'VARIANT',
'ctype': 'gpointer',
'getter': 'g_marshal_value_peek_variant',
'box': ['g_variant_ref', 'g_variant_unref'],
'box': ['g_variant_ref_sink', 'g_variant_unref'],
'static-check': True,
'takes-type': False,
},