[vala/0.38] codegen: Don't add length fields for captured fixed-length array variables



commit bf7de388729fff6ef34995c4dfe779b5387a220d
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Mar 19 10:46:13 2018 +0100

    codegen: Don't add length fields for captured fixed-length array variables

 codegen/valaccodebasemodule.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index f6e8ae1..75f1c2a 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -1949,7 +1949,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 
                                        data.add_field (get_ccode_name (local.variable_type), get_local_cname 
(local), 0, get_ccode_declarator_suffix (local.variable_type));
 
-                                       if (local.variable_type is ArrayType) {
+                                       if (local.variable_type is ArrayType && !((ArrayType) 
local.variable_type).fixed_length) {
                                                var array_type = (ArrayType) local.variable_type;
                                                for (int dim = 1; dim <= array_type.rank; dim++) {
                                                        data.add_field ("gint", get_array_length_cname 
(get_local_cname (local), dim));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]