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.

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 e34839f8f4
commit f044ddc1ee
2 changed files with 132 additions and 1 deletions

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,
},