From: Luca Bruno Date: Fri, 20 May 2011 12:57:50 +0000 (+0200) Subject: codegen: Drop ccomma expressions in copy_value X-Git-Tag: 0.13.0~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b05c67f9fd42584febab6435f09a23647b461f44;p=thirdparty%2Fvala.git codegen: Drop ccomma expressions in copy_value --- diff --git a/codegen/valaccodearraymodule.vala b/codegen/valaccodearraymodule.vala index c40863abc..18e38dfba 100644 --- a/codegen/valaccodearraymodule.vala +++ b/codegen/valaccodearraymodule.vala @@ -420,7 +420,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule { return base.copy_value (value, node); } - var decl = get_temp_variable (type, false, node); + var decl = get_temp_variable (type, false, node, false); emit_temp_var (decl); var ctemp = get_variable_cexpression (decl.name); @@ -428,13 +428,9 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule { var copy_call = new CCodeFunctionCall (new CCodeIdentifier (generate_array_copy_wrapper (array_type))); copy_call.add_argument (cexpr); copy_call.add_argument (ctemp); + ccode.add_expression (copy_call); - var ccomma = new CCodeCommaExpression (); - - ccomma.append_expression (copy_call); - ccomma.append_expression (ctemp); - - return new GLibValue (type, ccomma); + return new GLibValue (type, ctemp); } else { return base.copy_value (value, node); }