[vala/switch-to-gir-gio: 19/40] girparser: Assume arrays without length are null terminated.
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/switch-to-gir-gio: 19/40] girparser: Assume arrays without length are null terminated.
- Date: Thu, 30 Dec 2010 18:46:55 +0000 (UTC)
commit d5f1800d663e24f2046fc8acf4000110b4f6fe95
Author: Luca Bruno <lucabru src gnome org>
Date: Sat Nov 20 11:10:31 2010 +0100
girparser: Assume arrays without length are null terminated.
vala/valagirparser.vala | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 0d442b0..7fae186 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -2167,6 +2167,7 @@ public class Vala.GirParser : CodeVisitor {
var field = new Field (name, type, null, get_current_src ());
field.access = SymbolAccessibility.PUBLIC;
field.no_array_length = true;
+ field.array_null_terminated = true;
if (allow_none == "1") {
type.nullable = true;
}
@@ -2438,6 +2439,7 @@ public class Vala.GirParser : CodeVisitor {
set_array_ccode (info.param, parameters[info.array_length_idx]);
} else if (info.param.variable_type is ArrayType) {
info.param.no_array_length = true;
+ info.param.array_null_terminated = true;
}
if (info.closure_idx != -1) {
@@ -2464,9 +2466,13 @@ public class Vala.GirParser : CodeVisitor {
}
} else if (return_type is ArrayType) {
if (s is Method) {
- ((Method) s).no_array_length = true;
+ var m = (Method) s;
+ m.no_array_length = true;
+ m.array_null_terminated = true;
} else {
- ((Delegate) s).no_array_length = true;
+ var d = (Delegate) s;
+ d.no_array_length = true;
+ d.array_null_terminated = true;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]