]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Skip elements with attribute private="1"
authorLuca Bruno <lucabru@src.gnome.org>
Fri, 27 May 2011 17:08:34 +0000 (19:08 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Fri, 27 May 2011 17:20:09 +0000 (19:20 +0200)
vala/valagirparser.vala

index 36fbe3d161d737cbda480c0efd20789aee94f5a2..839c1057a9349ea5f1e9f87f26122ff39987cea8 100644 (file)
@@ -1211,7 +1211,7 @@ public class Vala.GirParser : CodeVisitor {
                        if (new_metadata.get_bool (ArgumentType.SKIP)) {
                                return false;
                        }
-               } else if (reader.get_attribute ("introspectable") == "0") {
+               } else if (reader.get_attribute ("introspectable") == "0" || reader.get_attribute ("private") == "1") {
                        return false;
                }
 
@@ -2125,6 +2125,9 @@ public class Vala.GirParser : CodeVisitor {
                next ();
                while (current_token == MarkupTokenType.START_ELEMENT) {
                        if (!push_metadata ()) {
+                               if (first_field && reader.name == "field") {
+                                       first_field = false;
+                               }
                                skip_element ();
                                continue;
                        }
@@ -2183,6 +2186,9 @@ public class Vala.GirParser : CodeVisitor {
                var first_field = true;
                while (current_token == MarkupTokenType.START_ELEMENT) {
                        if (!push_metadata ()) {
+                               if (first_field && reader.name == "field") {
+                                       first_field = false;
+                               }
                                skip_element ();
                                continue;
                        }