]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Fix parsing glib:boxed
authorLuca Bruno <lucabru@src.gnome.org>
Wed, 5 Jan 2011 11:33:04 +0000 (12:33 +0100)
committerJürg Billeter <j@bitron.ch>
Wed, 5 Jan 2011 21:04:18 +0000 (22:04 +0100)
vala/valagirparser.vala

index 38c12d4aa6a0be08c9953819156ea2c27face178..f3c614affee2fc3a61d3eb3d1e1310dbcf00e7f0 100644 (file)
@@ -1372,7 +1372,7 @@ public class Vala.GirParser : CodeVisitor {
                                add_symbol_info (parse_callback ());
                        } else if (reader.name == "record") {
                                if (reader.get_attribute ("glib:get-type") != null) {
-                                       add_symbol_info (parse_boxed ());
+                                       add_symbol_info (parse_boxed ("record"));
                                } else {
                                        add_symbol_info (parse_record ());
                                }
@@ -1383,7 +1383,7 @@ public class Vala.GirParser : CodeVisitor {
                                add_symbol_info (iface);
                                interfaces.add (iface);
                        } else if (reader.name == "glib:boxed") {
-                               add_symbol_info (parse_boxed ());
+                               add_symbol_info (parse_boxed ("glib:boxed"));
                        } else if (reader.name == "union") {
                                add_symbol_info (parse_union ());
                        } else if (reader.name == "constant") {
@@ -2408,7 +2408,8 @@ public class Vala.GirParser : CodeVisitor {
                return sig;
        }
 
-       Class parse_boxed () {
+       Class parse_boxed (string element_name) {
+               start_element (element_name);
                string name = reader.get_attribute ("name");
                if (name == null) {
                        name = reader.get_attribute ("glib:name");
@@ -2449,6 +2450,7 @@ public class Vala.GirParser : CodeVisitor {
 
                        pop_metadata ();
                }
+               end_element (element_name);
 
                if (current_token != MarkupTokenType.END_ELEMENT) {
                        // error