Fix regress_test_closure_variant return value
authorMartin Pitt <martinpitt@gnome.org>
Sat, 5 May 2012 19:14:52 +0000 (12:14 -0700)
committerMartin Pitt <martinpitt@gnome.org>
Sat, 5 May 2012 21:10:42 +0000 (14:10 -0700)
commit66e39f44fc77523f4241bd5b5b87edcfce2d5df6
treeeb2cce82bcc019b9793ba69898ed3ccc3c5efd40
parent29cc66db433b83c5dd13c1fae8ddc0464ab5d031
Fix regress_test_closure_variant return value

We need to g_variant_ref() the return type: the closure delivers it wrapped
in a GValue, and the subsequent g_value_unset() unrefs it to zero otherwise.

This was uncovered by the now working TestClosures.test_variant() test case in
PyGObject.

Also allow passing NULL as argument, to be able to test these code paths as
well.
tests/scanner/Regress-1.0-expected.gir
tests/scanner/regress.c