[vala/temp] girparser: Skip elements with attribute private="1"



commit 482d073fe5dd2482f2d4a5d6cd9503c7cb5c333b
Author: Luca Bruno <lucabru src gnome org>
Date:   Fri May 27 19:08:34 2011 +0200

    girparser: Skip elements with attribute private="1"

 vala/valagirparser.vala |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 36fbe3d..839c105 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -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;
 			}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]