[vala] codegen: Support resize and concatenation on the same array
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] codegen: Support resize and concatenation on the same array
- Date: Sat, 16 Oct 2010 07:52:11 +0000 (UTC)
commit d31d40d07c94422f76df275e6cdb28867959e4bd
Author: Jürg Billeter <j bitron ch>
Date: Sat Oct 16 09:51:06 2010 +0200
codegen: Support resize and concatenation on the same array
Fixes bug 631540.
codegen/valaccodemethodcallmodule.vala | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valaccodemethodcallmodule.vala b/codegen/valaccodemethodcallmodule.vala
index bfb707f..cceec70 100644
--- a/codegen/valaccodemethodcallmodule.vala
+++ b/codegen/valaccodemethodcallmodule.vala
@@ -717,6 +717,13 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
ccomma.append_expression (new CCodeConditionalExpression (ccheck, czero, new CCodeConstant ("NULL")));
ccomma.append_expression (new CCodeAssignment (get_array_length_cexpression (ma.inner, 1), temp_ref));
+ var array_var = ma.inner.symbol_reference;
+ var array_local = array_var as LocalVariable;
+ if (array_var != null && array_var.is_internal_symbol ()
+ && ((array_var is LocalVariable && !array_local.captured) || array_var is Field)) {
+ ccomma.append_expression (new CCodeAssignment (get_array_size_cexpression (ma.inner), temp_ref));
+ }
+
set_cvalue (expr, ccomma);
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]