[vala/switch-to-gir: 22/30] girparser: Skip private structs.
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/switch-to-gir: 22/30] girparser: Skip private structs.
- Date: Sat, 25 Dec 2010 12:08:25 +0000 (UTC)
commit 173a8a9f9953d619dc01552a0e66a3b7fc342176
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 2711fab..18fe86a 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 ());
} 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 ());
@@ -1995,9 +1999,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]