]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vapigen: Support hidden attribute for interface implementations
authorJürg Billeter <j@bitron.ch>
Sat, 15 Jan 2011 10:18:54 +0000 (11:18 +0100)
committerJürg Billeter <j@bitron.ch>
Sat, 15 Jan 2011 10:31:58 +0000 (11:31 +0100)
vapigen/valagidlparser.vala

index f7061bcd1483cea11c7d54ca0d70b7af3ab263c3..46d0747e96102fc40c4f0063c106e2efaa60fb2f 100644 (file)
@@ -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);
                }