[vala/staging] codegen: Don't add length fields for captured fixed-length array variables
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] codegen: Don't add length fields for captured fixed-length array variables
- Date: Mon, 19 Mar 2018 09:57:39 +0000 (UTC)
commit 77315cdd7f938b313292e2a0bc19714eba5631c1
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 ffd773e..44d88e4 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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]