From: Rico Tzschichholz Date: Mon, 19 Mar 2018 09:46:13 +0000 (+0100) Subject: codegen: Don't add length fields for captured fixed-length array variables X-Git-Tag: 0.40.1~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77315cdd7f938b313292e2a0bc19714eba5631c1;p=thirdparty%2Fvala.git codegen: Don't add length fields for captured fixed-length array variables --- diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala index ffd773ed7..44d88e41c 100644 --- a/codegen/valaccodebasemodule.vala +++ b/codegen/valaccodebasemodule.vala @@ -1983,7 +1983,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));