]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Use destroy_value in method calls
authorLuca Bruno <lucabru@src.gnome.org>
Wed, 4 May 2011 09:34:52 +0000 (11:34 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Wed, 4 May 2011 09:34:52 +0000 (11:34 +0200)
codegen/valaccodemethodcallmodule.vala

index f7abf5ebd9a32714a3ee1af1d285bb9dadc1747f..ce45393285c75788f02666fc49ca97728f1f621c 100644 (file)
@@ -771,7 +771,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
 
                        if (requires_destroy (arg.value_type)) {
                                // unref old value
-                               ccode.add_expression (get_unref_expression (get_cvalue (unary.inner), unary.inner.value_type, unary.inner));
+                               ccode.add_expression (destroy_value (unary.inner.target_value));
                        }
 
                        // assign new value