[vala] codegen: Drop ccomma expressions in copy_value
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] codegen: Drop ccomma expressions in copy_value
- Date: Fri, 20 May 2011 13:41:26 +0000 (UTC)
commit b05c67f9fd42584febab6435f09a23647b461f44
Author: Luca Bruno <lucabru src gnome org>
Date: Fri May 20 14:57:50 2011 +0200
codegen: Drop ccomma expressions in copy_value
codegen/valaccodearraymodule.vala | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/codegen/valaccodearraymodule.vala b/codegen/valaccodearraymodule.vala
index c40863a..18e38df 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]