[vala/wip/girparser: 1/3] girparser: Respect "zero-terminated" annotation for fields
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/girparser: 1/3] girparser: Respect "zero-terminated" annotation for fields
- Date: Wed, 1 Jun 2016 14:21:48 +0000 (UTC)
commit 10d80681db9a88cca188504a5c9db3d668fa2997
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]