summaryrefslogtreecommitdiff
path: root/vapigen
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2020-10-26 16:10:37 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2020-10-26 16:10:37 +0100
commit1d78426a2b172f0b0ba2f04d1f5c51ad75c82ef5 (patch)
tree7f82f8eed0a1590ecbb830d575ee0f092a2e433e /vapigen
parent545121d1322d3f73880b3f14d86d3d7bd976e664 (diff)
downloadvala-1d78426a2b172f0b0ba2f04d1f5c51ad75c82ef5.tar.gz
vala: Make use of new printf-like API of Report.*()
Diffstat (limited to 'vapigen')
-rw-r--r--vapigen/valagidlparser.vala4
-rw-r--r--vapigen/valavapicheck.vala8
-rw-r--r--vapigen/valavapigen.vala4
3 files changed, 8 insertions, 8 deletions
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index d4c70d8a2..9355a8516 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -132,7 +132,7 @@ public class Vala.GIdlParser : CodeVisitor {
codenode_attributes_map[tokens[0]] = tokens[1];
}
} catch (FileError e) {
- Report.error (null, "Unable to read metadata file: %s".printf (e.message));
+ Report.error (null, "Unable to read metadata file: %s", e.message);
}
}
@@ -148,7 +148,7 @@ public class Vala.GIdlParser : CodeVisitor {
}
}
} catch (MarkupError e) {
- Report.error (null, "Unable to parse GIDL file: %s".printf (e.message));
+ Report.error (null, "Unable to parse GIDL file: %s", e.message);
}
}
diff --git a/vapigen/valavapicheck.vala b/vapigen/valavapicheck.vala
index 45eb33c8e..9214e16ec 100644
--- a/vapigen/valavapicheck.vala
+++ b/vapigen/valavapicheck.vala
@@ -138,7 +138,7 @@ class Vala.VAPICheck {
if (symbol.length > 0 && !_symbols.contains (symbol)) {
var src = new SourceReference (metadata, SourceLocation (null, lineno, 1), SourceLocation (null, lineno, (int)symbol.length));
- Report.error (src, "Symbol `%s' not found".printf (symbol));
+ Report.error (src, "Symbol `%s' not found", symbol);
}
lineno += 1;
@@ -146,19 +146,19 @@ class Vala.VAPICheck {
return 0;
} catch (Error error) {
- Report.error (null, "%s: %s".printf (metadata.filename, error.message));
+ Report.error (null, "%s: %s", metadata.filename, error.message);
return 1;
}
}
public int run () {
if (!FileUtils.test (gidl.filename, FileTest.IS_REGULAR)) {
- Report.error (null, "%s not found".printf (gidl.filename));
+ Report.error (null, "%s not found", gidl.filename);
return 2;
}
if (!FileUtils.test (metadata.filename, FileTest.IS_REGULAR)) {
- Report.error (null, "%s not found".printf (metadata.filename));
+ Report.error (null, "%s not found", metadata.filename);
return 2;
}
diff --git a/vapigen/valavapigen.vala b/vapigen/valavapigen.vala
index f39c5250e..7eb4fc044 100644
--- a/vapigen/valavapigen.vala
+++ b/vapigen/valavapigen.vala
@@ -130,7 +130,7 @@ class Vala.VAPIGen {
source_file.from_commandline = true;
context.add_source_file (source_file);
} else {
- Report.error (null, "%s not found".printf (source));
+ Report.error (null, "%s not found", source);
}
}
@@ -193,7 +193,7 @@ class Vala.VAPIGen {
var library_name = Path.get_basename (library);
if (package_names.length > 0 && !(library_name in package_names)) {
- Report.warning (null, "Given library name `%s' does not match pkg-config name `%s'".printf (library_name, string.join ("', `", package_names)));
+ Report.warning (null, "Given library name `%s' does not match pkg-config name `%s'", library_name, string.join ("', `", package_names));
}
var interface_writer = new CodeWriter (CodeWriterType.VAPIGEN);