]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Add printf_format metadata
authorLuca Bruno <lucabru@src.gnome.org>
Tue, 24 May 2011 17:53:31 +0000 (19:53 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Tue, 24 May 2011 17:55:30 +0000 (19:55 +0200)
vala/valagirparser.vala

index cc972212441368fe539a2885c04d614da9e707cf..3afc6c4d0b6f648a8ae8c4154665c5b36844d18d 100644 (file)
@@ -62,7 +62,8 @@ public class Vala.GirParser : CodeVisitor {
                ABSTRACT,
                SCOPE,
                STRUCT,
-               THROWS;
+               THROWS,
+               PRINTF_FORMAT;
 
                public static ArgumentType? from_string (string name) {
                        var enum_class = (EnumClass) typeof(ArgumentType).class_ref ();
@@ -2439,6 +2440,10 @@ public class Vala.GirParser : CodeVisitor {
                        }
                }
 
+               if (s is Method && metadata.get_bool (ArgumentType.PRINTF_FORMAT)) {
+                       ((Method) s).printf_format = true;
+               }
+
                current.symbol = s;
 
                var parameters = new ArrayList<ParameterInfo> ();