]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gidlparser: Add no_delegate_target metadata for fields
authorLuca Bruno <lucabru@src.gnome.org>
Sun, 26 Jun 2011 16:59:01 +0000 (18:59 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Sun, 26 Jun 2011 17:00:26 +0000 (19:00 +0200)
vapigen/valagidlparser.vala

index 316e42024b32c80a7e5bafe3227e8f99dc083102..137bf2ccaca0564c356cb04a09bd5350dd1b5d7f 100644 (file)
@@ -2597,6 +2597,7 @@ public class Vala.GIdlParser : CodeVisitor {
                string deprecated_since = null;
                string replacement = null;
                bool experimental = false;
+               bool no_delegate_target = false;
 
                var attributes = get_attributes ("%s.%s".printf (current_data_type.get_cname (), node.name));
                if (attributes != null) {
@@ -2646,6 +2647,10 @@ public class Vala.GIdlParser : CodeVisitor {
                                        array_length_cname = eval (nv[1]);
                                } else if (nv[0] == "array_length_type") {
                                        array_length_type = eval (nv[1]);
+                               } else if (nv[0] == "no_delegate_target") {
+                                       if (eval (nv[1]) == "1") {
+                                               no_delegate_target = true;
+                                       }
                                } else if (nv[0] == "experimental") {
                                        if (eval (nv[1]) == "1") {
                                                experimental = true;
@@ -2714,6 +2719,10 @@ public class Vala.GIdlParser : CodeVisitor {
                        field.no_array_length = true;
                }
 
+               if (no_delegate_target) {
+                       field.no_delegate_target = true;
+               }
+
                return field;
        }