From be867f9658b64ee0a93f7730929b421e37b911f6 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 2 May 2012 12:49:25 +0200 Subject: Fix GVariant handling in regress_test_closure_variant Commit 7c4fbbd6 introduced some low-level g_memdup()ing of the passed GVariant in regress_test_closure_variant(). This causes a race condition with GI clients like pygobject's test suite, which sometimes fail with (runtests.py:15653): GLib-CRITICAL **: g_variant_ref_sink: assertion `value->ref_count > 0' failed Drop the memduping again, and instead make the argument non-const (which is true, as the method temporarily increases the refcount). --- tests/scanner/regress.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/scanner/regress.h') diff --git a/tests/scanner/regress.h b/tests/scanner/regress.h index c2a25c13..15b8ce2e 100644 --- a/tests/scanner/regress.h +++ b/tests/scanner/regress.h @@ -122,7 +122,7 @@ GPtrArray *regress_test_garray_full_return (void); /* closure */ int regress_test_closure (GClosure *closure); int regress_test_closure_one_arg (GClosure *closure, int arg); -GVariant *regress_test_closure_variant (GClosure *closure, const GVariant* arg); +GVariant *regress_test_closure_variant (GClosure *closure, GVariant* arg); /* value */ int regress_test_int_value_arg(const GValue *v); -- cgit v1.2.1