From: Jürg Billeter Date: Sat, 15 Jan 2011 10:18:54 +0000 (+0100) Subject: vapigen: Support hidden attribute for interface implementations X-Git-Tag: 0.11.4~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e90ab65ff8308767fdeaf175aeab819938ade77;p=thirdparty%2Fvala.git vapigen: Support hidden attribute for interface implementations --- diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala index f7061bcd1..46d0747e9 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); }