[vala] girparser: Add printf_format metadata



commit 14b99b59b6c4b8ad161249d25cd928c8710b0f6b
Author: Luca Bruno <lucabru src gnome org>
Date:   Tue May 24 19:53:31 2011 +0200

    girparser: Add printf_format metadata

 vala/valagirparser.vala |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index cc97221..3afc6c4 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -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> ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]