From f843ba8c444e951ae46465f99ffee1ef5a5ac9b8 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Sat, 8 Jun 2019 00:10:07 +0100 Subject: [PATCH] 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 Fixes: #1793 --- gobject/glib-genmarshal.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in index dc4c7eacc..f17e05532 100755 --- a/gobject/glib-genmarshal.in +++ b/gobject/glib-genmarshal.in @@ -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, },