[vala/switch-to-gir: 3/3] girparser: Skip priv fields when parsing record.



commit 51809dcb954519eba67e5b7f7de1fee6b87a8fcf
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 fbed2f0..ce1b552 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -2003,7 +2003,11 @@ public class Vala.GirParser : CodeVisitor {
 			}
 
 			if (reader.name == "field") {
-				add_symbol_info (parse_field ());
+				if (reader.get_attribute ("name") != "priv") {
+					add_symbol_info (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]