[vala/switch-to-gir-gio: 22/43] girparser: Skip private structs.



commit 2816e460e3725adfa079af30a9a0cc6ce688877d
Author: Luca Bruno <lucabru src gnome org>
Date:   Tue Nov 23 21:53:43 2010 +0100

    girparser: Skip private structs.

 vala/valagirparser.vala |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 4233f43..06bd827 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -1437,7 +1437,11 @@ public class Vala.GirParser : CodeVisitor {
 				if (reader.get_attribute ("glib:get-type") != null) {
 					add_symbol_info (parse_boxed ("record"));
 				} else {
-					add_symbol_info (parse_record ());
+					if (!reader.get_attribute ("name").has_suffix ("Private")) {
+						add_symbol_info (parse_record ());
+					} else {
+						skip_element ();
+					}
 				}
 			} else if (reader.name == "class") {
 				add_symbol_info (parse_class ());
@@ -2007,9 +2011,10 @@ public class Vala.GirParser : CodeVisitor {
 					// first field is guaranteed to be the parent instance
 					skip_element ();
 				} else {
-					var field = parse_field ();
-					if (field.name != "priv") {
-						add_symbol_info (field);
+					if (reader.get_attribute ("name") != "priv") {
+						add_symbol_info (parse_field ());
+					} else {
+						skip_element ();
 					}
 				}
 				first_field = false;



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