[vala/staging: 1/3] girparser: Respect "zero-terminated" annotation for fields
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 1/3] girparser: Respect "zero-terminated" annotation for fields
- Date: Tue, 31 May 2016 15:05:59 +0000 (UTC)
commit e9060c915782415c7d09e4cc4529d7e3ad589af4
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue May 31 16:47:05 2016 +0200
girparser: Respect "zero-terminated" annotation for fields
vala/valagirparser.vala | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 257894d..ec6371a 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -2892,7 +2892,9 @@ public class Vala.GirParser : CodeVisitor {
if (no_array_length) {
field.set_attribute_bool ("CCode", "array_length", false);
}
- field.set_attribute_bool ("CCode", "array_null_terminated", true);
+ if (array_null_terminated) {
+ field.set_attribute_bool ("CCode", "array_null_terminated", true);
+ }
}
if (nullable == "1" || allow_none == "1") {
type.nullable = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]