[vala] girparser: Support ByteArray arrays.
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] girparser: Support ByteArray arrays.
- Date: Mon, 4 Apr 2011 14:18:21 +0000 (UTC)
commit 740b0116b966b2d34a5d4bbab196713720ca9b6e
Author: Luca Bruno <lucabru src gnome org>
Date: Thu Dec 30 19:07:15 2010 +0100
girparser: Support ByteArray arrays.
vala/valagirparser.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index e93b73d..7dff6a4 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -1819,7 +1819,7 @@ public class Vala.GirParser : CodeVisitor {
is_array = true;
start_element ("array");
- if (!(type_name == "GLib.Array" || type_name == "GLib.PtrArray")) {
+ if (type_name == null) {
if (reader.get_attribute ("length") != null
&& &array_length_index != null) {
array_length_index = int.parse (reader.get_attribute ("length"));
@@ -1849,6 +1849,10 @@ public class Vala.GirParser : CodeVisitor {
// type arguments / element types
while (current_token == MarkupTokenType.START_ELEMENT) {
+ if (type_name == "GLib.ByteArray") {
+ skip_element ();
+ continue;
+ }
var element_type = parse_type ();
element_type.value_owned = transfer_elements;
type.add_type_argument (element_type);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]