[vala/switch-to-gir: 38/49] girparser: Support ByteArray arrays.



commit 0231ec1b84e98291881fe6820c3b213d888f0ac1
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]