Fix GVariant handling in regress_test_closure_variant
authorMartin Pitt <martinpitt@gnome.org>
Wed, 2 May 2012 10:49:25 +0000 (12:49 +0200)
committerMartin Pitt <martinpitt@gnome.org>
Wed, 2 May 2012 10:49:25 +0000 (12:49 +0200)
commitbe867f9658b64ee0a93f7730929b421e37b911f6
tree00ace6da3056cb5de0e61c16f8d55a96dc9f1869
parentd7ff7296d4bf661b165dc5975754c70ec8610eec
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.c
tests/scanner/regress.h