[vala] girparser: Skip priv fields when parsing record



commit 35593b17a08ad643f015c77b2830fd4604454f17
Author: Luca Bruno <lucabru src gnome org>
Date:   Wed Jan 5 12:33:19 2011 +0100

    girparser: Skip priv fields when parsing record

 vala/valagirparser.vala |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index f3c614a..150c3e9 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -1846,7 +1846,11 @@ public class Vala.GirParser : CodeVisitor {
 			}
 
 			if (reader.name == "field") {
-				st.add_field (parse_field ());
+				if (reader.get_attribute ("name") != "priv") {
+					st.add_field (parse_field ());
+				} else {
+					skip_element ();
+				}
 			} else if (reader.name == "constructor") {
 				parse_constructor ();
 			} else if (reader.name == "method") {



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