[vala/switch-to-gir: 38/47] girparser: Support ByteArray arrays.
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/switch-to-gir: 38/47] girparser: Support ByteArray arrays.
- Date: Thu, 6 Jan 2011 11:52:45 +0000 (UTC)
commit d05929aedfa0d4cf3abbd3f16c0017dd2c20af87
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 7779030..97bceaf 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 = reader.get_attribute ("length").to_int ();
@@ -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]