[valadoc] libvaladoc: drop varargs for signatures with implicit parameters



commit 61df61ef805b550970475146be5de323acae5cfd
Author: Florian Brosch <flo brosch gmail com>
Date:   Mon Jan 23 16:21:37 2012 +0100

    libvaladoc: drop varargs for signatures with implicit parameters

 .../documentation/documentationparser.vala         |    2 +-
 src/libvaladoc/parser/manyrule.vala                |    2 +-
 src/libvaladoc/parser/parser.vala                  |   10 ++++------
 src/libvaladoc/parser/parsercallback.vala          |    4 ++--
 src/libvaladoc/parser/sequencerule.vala            |    2 +-
 5 files changed, 9 insertions(+), 11 deletions(-)
---
diff --git a/src/libvaladoc/documentation/documentationparser.vala b/src/libvaladoc/documentation/documentationparser.vala
index 1b29698..5a4f141 100755
--- a/src/libvaladoc/documentation/documentationparser.vala
+++ b/src/libvaladoc/documentation/documentationparser.vala
@@ -171,7 +171,7 @@ public class Valadoc.DocumentationParser : Object, ResourceLocator {
 					((InlineContent) peek ()).content.add (_factory.create_text (" "));
 					return;
 				} else if (list.bullet != bullet) {
-					_parser.error (null, "Invalid bullet type '%s': expected '%s'", bullet_type_string (bullet), bullet_type_string (list.bullet));
+					_parser.error (null, "Invalid bullet type '%s': expected '%s'".printf (bullet_type_string (bullet), bullet_type_string (list.bullet)));
 					return;
 				}
 
diff --git a/src/libvaladoc/parser/manyrule.vala b/src/libvaladoc/parser/manyrule.vala
index 40bf627..be19b5b 100755
--- a/src/libvaladoc/parser/manyrule.vala
+++ b/src/libvaladoc/parser/manyrule.vala
@@ -78,7 +78,7 @@ internal class Valadoc.ManyRule : Rule {
 		}
 
 		if (_scheme is TokenType) {
-			parser.error (null, "expected %s", ((TokenType) _scheme).to_pretty_string ());
+			parser.error (null, "expected %s".printf (((TokenType) _scheme).to_pretty_string ()));
 		} else {
 			parser.error (token, "unexpected token");
 		}
diff --git a/src/libvaladoc/parser/parser.vala b/src/libvaladoc/parser/parser.vala
index 49147e2..aaa6181 100755
--- a/src/libvaladoc/parser/parser.vala
+++ b/src/libvaladoc/parser/parser.vala
@@ -224,12 +224,11 @@ public class Valadoc.Parser : ParserCallback {
 		return false;
 	}
 
-	public void warning (Token? token, string message, ...) {
-		va_list args = va_list ();
+	public void warning (Token? token, string message) {
 		string error_message;
 
 		if (token == null) {
-			error_message = message.vprintf (args) + ": " + token.to_pretty_string ();
+			error_message = message + ": " + token.to_pretty_string ();
 		} else {
 			error_message = message;
 		}
@@ -242,12 +241,11 @@ public class Valadoc.Parser : ParserCallback {
 		                   error_message);
 	}
 
-	public void error (Token? token, string message, ...) throws ParserError {
-		va_list args = va_list ();
+	public void error (Token? token, string message) throws ParserError {
 		string error_message;
 
 		if (token == null) {
-			error_message = message.vprintf (args) + ": " + token.to_pretty_string ();
+			error_message = message + ": " + token.to_pretty_string ();
 		} else {
 			error_message = message;
 		}
diff --git a/src/libvaladoc/parser/parsercallback.vala b/src/libvaladoc/parser/parsercallback.vala
index a3d6792..c6fef18 100755
--- a/src/libvaladoc/parser/parsercallback.vala
+++ b/src/libvaladoc/parser/parsercallback.vala
@@ -32,6 +32,6 @@ public interface Valadoc.ParserCallback {
 	public abstract bool would_parent_accept_token (Token token);
 	public abstract bool would_parent_reduce_to_rule (Token token, Rule rule);
 
-	public abstract void warning (Token? token, string message, ...);
-	public abstract void error (Token? token, string message, ...) throws ParserError;
+	public abstract void warning (Token? token, string message);
+	public abstract void error (Token? token, string message) throws ParserError;
 }
diff --git a/src/libvaladoc/parser/sequencerule.vala b/src/libvaladoc/parser/sequencerule.vala
index 39bc620..268d50a 100755
--- a/src/libvaladoc/parser/sequencerule.vala
+++ b/src/libvaladoc/parser/sequencerule.vala
@@ -103,7 +103,7 @@ internal class Valadoc.SequenceRule : Rule {
 		}
 
 		if (scheme_element is TokenType) {
-			parser.error (token, "expected %s", ((TokenType) scheme_element).to_pretty_string ());
+			parser.error (token, "expected %s".printf (((TokenType) scheme_element).to_pretty_string ()));
 		} else {
 			parser.error (token, "unexpected token");
 		}



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