[vala] vapigen: Support hidden attribute for interface implementations
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] vapigen: Support hidden attribute for interface implementations
- Date: Sat, 15 Jan 2011 10:33:16 +0000 (UTC)
commit 8e90ab65ff8308767fdeaf175aeab819938ade77
Author: Jürg Billeter <j bitron ch>
Date: Sat Jan 15 11:18:54 2011 +0100
vapigen: Support hidden attribute for interface implementations
vapigen/valagidlparser.vala | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index f7061bc..46d0747 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -1328,6 +1328,24 @@ public class Vala.GIdlParser : CodeVisitor {
}
foreach (string iface_name in node.interfaces) {
+ bool skip_iface = false;
+
+ var attributes = get_attributes (iface_name);
+ if (attributes != null) {
+ foreach (string attr in attributes) {
+ var nv = attr.split ("=", 2);
+ if (nv[0] == "hidden") {
+ if (eval (nv[1]) == "1") {
+ skip_iface = true;
+ }
+ }
+ }
+ }
+
+ if (skip_iface) {
+ continue;
+ }
+
var iface = parse_type_string (iface_name);
cl.add_base_type (iface);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]