[vala] codegen: Use separate C statements for array add expressions
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] codegen: Use separate C statements for array add expressions
- Date: Tue, 21 Dec 2010 18:02:27 +0000 (UTC)
commit cd2248fb3bf9db830113c523a6402aca064e64b7
Author: Jürg Billeter <j bitron ch>
Date: Tue Dec 21 17:39:33 2010 +0100
codegen: Use separate C statements for array add expressions
codegen/valaccodearraymodule.vala | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/codegen/valaccodearraymodule.vala b/codegen/valaccodearraymodule.vala
index 4da5b37..1a367f3 100644
--- a/codegen/valaccodearraymodule.vala
+++ b/codegen/valaccodearraymodule.vala
@@ -697,7 +697,6 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
// valid array add
} else {
Report.error (assignment.source_reference, "Array concatenation not supported for public array variables and parameters");
- set_cvalue (assignment, new CCodeInvalidExpression ());
return;
}
@@ -709,7 +708,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
ccall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, get_array_size_cvalue (array.target_value)));
ccall.add_argument (handle_struct_argument (value_param, element, get_cvalue (element)));
- set_cvalue (assignment, ccall);
+ ccode.add_expression (ccall);
}
public override CCodeParameter generate_parameter (Parameter param, CCodeFile decl_space, Map<int,CCodeParameter> cparam_map, Map<int,CCodeExpression>? carg_map) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]