]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Support ByteArray arrays.
authorLuca Bruno <lucabru@src.gnome.org>
Thu, 30 Dec 2010 18:07:15 +0000 (19:07 +0100)
committerLuca Bruno <lucabru@src.gnome.org>
Mon, 4 Apr 2011 13:14:46 +0000 (15:14 +0200)
vala/valagirparser.vala

index e93b73dbdf97eb8f0256137649b6b83e6a19bde5..7dff6a404373725f922ad71333d27b27944937e2 100644 (file)
@@ -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);