[vala] girparser: Skip private structs.
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] girparser: Skip private structs.
- Date: Mon, 4 Apr 2011 14:17:00 +0000 (UTC)
commit 404557e3424bdd0d6635f00bd18b5a07e815280f
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 d8fdab6..a3c7ab9 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]