]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Don't add length fields for captured fixed-length array variables
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 19 Mar 2018 09:46:13 +0000 (10:46 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 16 Apr 2018 19:12:47 +0000 (21:12 +0200)
codegen/valaccodebasemodule.vala

index 6df6714adee0df3c2a5c5faeddbdedaedea26a94..cbdafca308e50d5d3a89e45a173037a4fcb632c6 100644 (file)
@@ -1929,7 +1929,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 
                                        data.add_field (get_ccode_name (local.variable_type), get_local_cname (local), 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));