]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Add closure argument for metadata
authorLuca Bruno <lucabru@src.gnome.org>
Thu, 9 Jun 2011 18:23:43 +0000 (20:23 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Thu, 9 Jun 2011 18:23:43 +0000 (20:23 +0200)
vala/valagirparser.vala

index 33882d0675829944eda56e8975d39a1b03ae0513..ee668105bd2dc104fcdf8811dbac55716bdff417 100644 (file)
@@ -65,7 +65,8 @@ public class Vala.GirParser : CodeVisitor {
                THROWS,
                PRINTF_FORMAT,
                ARRAY_LENGTH_FIELD,
-               SENTINEL;
+               SENTINEL,
+               CLOSURE;
 
                public static ArgumentType? from_string (string name) {
                        var enum_class = (EnumClass) typeof(ArgumentType).class_ref ();
@@ -1916,6 +1917,9 @@ public class Vala.GirParser : CodeVisitor {
                if (destroy != null && &destroy_idx != null) {
                        destroy_idx = int.parse (destroy);
                }
+               if (metadata.has_argument (ArgumentType.CLOSURE)) {
+                       closure_idx = metadata.get_integer (ArgumentType.CLOSURE);
+               }
 
                next ();
                if (reader.name == "varargs") {