diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2020-10-26 16:10:37 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2020-10-26 16:10:37 +0100 |
commit | 545121d1322d3f73880b3f14d86d3d7bd976e664 (patch) | |
tree | 1916736e7d4dceaa8c47502dca00fd3f55ed13c2 | |
parent | 64ad6bb8aa0b26a330c2a678b5cfbba2ad0a646f (diff) | |
download | vala-545121d1322d3f73880b3f14d86d3d7bd976e664.tar.gz |
codegen: Make use of new printf-like API of Report.*()
-rw-r--r-- | codegen/valaccodeattribute.vala | 10 | ||||
-rw-r--r-- | codegen/valaccodebasemodule.vala | 32 | ||||
-rw-r--r-- | codegen/valaccodecompiler.vala | 2 | ||||
-rw-r--r-- | codegen/valaccodememberaccessmodule.vala | 8 | ||||
-rw-r--r-- | codegen/valaccodestructmodule.vala | 2 | ||||
-rw-r--r-- | codegen/valagdbusclientmodule.vala | 4 | ||||
-rw-r--r-- | codegen/valagdbusservermodule.vala | 2 | ||||
-rw-r--r-- | codegen/valagirwriter.vala | 8 | ||||
-rw-r--r-- | codegen/valagobjectmodule.vala | 8 | ||||
-rw-r--r-- | codegen/valagtkmodule.vala | 24 | ||||
-rw-r--r-- | codegen/valagtypemodule.vala | 4 | ||||
-rw-r--r-- | codegen/valagvariantmodule.vala | 4 |
12 files changed, 54 insertions, 54 deletions
diff --git a/codegen/valaccodeattribute.vala b/codegen/valaccodeattribute.vala index c73d124c0..dc6307b7b 100644 --- a/codegen/valaccodeattribute.vala +++ b/codegen/valaccodeattribute.vala @@ -429,7 +429,7 @@ public class Vala.CCodeAttribute : AttributeCache { index = method.get_async_end_parameters ().index_of (param); } if (index < 0) { - Report.error (param.source_reference, "internal: Parameter `%s' not found in `%s'".printf (param.name, method.get_full_name ())); + Report.error (param.source_reference, "internal: Parameter `%s' not found in `%s'", param.name, method.get_full_name ()); } _pos = index + 1.0; } else if (callable != null) { @@ -1092,7 +1092,7 @@ public class Vala.CCodeAttribute : AttributeCache { } } if (st.is_simple_type ()) { - Report.error (st.source_reference, "The type `%s' doesn't declare a marshaller type name".printf (st.get_full_name ())); + Report.error (st.source_reference, "The type `%s' doesn't declare a marshaller type name", st.get_full_name ()); } else if (get_ccode_has_type_id (st)) { return "BOXED"; } else { @@ -1190,7 +1190,7 @@ public class Vala.CCodeAttribute : AttributeCache { } } if (st.is_simple_type ()) { - Report.error (st.source_reference, "The type `%s' doesn't declare a GValue get function".printf (st.get_full_name ())); + Report.error (st.source_reference, "The type `%s' doesn't declare a GValue get function", st.get_full_name ()); } else if (get_ccode_has_type_id (st)) { return "g_value_get_boxed"; } else { @@ -1248,7 +1248,7 @@ public class Vala.CCodeAttribute : AttributeCache { } } if (st.is_simple_type ()) { - Report.error (st.source_reference, "The type `%s' doesn't declare a GValue set function".printf (st.get_full_name ())); + Report.error (st.source_reference, "The type `%s' doesn't declare a GValue set function", st.get_full_name ()); } else if (get_ccode_has_type_id (st)) { return "g_value_set_boxed"; } else { @@ -1306,7 +1306,7 @@ public class Vala.CCodeAttribute : AttributeCache { } } if (st.is_simple_type ()) { - Report.error (st.source_reference, "The type `%s' doesn't declare a GValue take function".printf (st.get_full_name ())); + Report.error (st.source_reference, "The type `%s' doesn't declare a GValue take function", st.get_full_name ()); } else if (get_ccode_has_type_id (st)) { return "g_value_take_boxed"; } else { diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala index b11992e17..ad292a777 100644 --- a/codegen/valaccodebasemodule.vala +++ b/codegen/valaccodebasemodule.vala @@ -571,7 +571,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { if (context.symbols_filename != null) { var stream = FileStream.open (context.symbols_filename, "w"); if (stream == null) { - Report.error (null, "unable to open `%s' for writing".printf (context.symbols_filename)); + Report.error (null, "unable to open `%s' for writing", context.symbols_filename); this.context = null; return; } @@ -594,7 +594,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { ret = header_file.store (context.header_filename, null, context.version_header, false, "#ifdef __cplusplus\nextern \"C\" {\n#endif", "#ifdef __cplusplus\n}\n#endif"); } if (!ret) { - Report.error (null, "unable to open `%s' for writing".printf (context.header_filename)); + Report.error (null, "unable to open `%s' for writing", context.header_filename); } } @@ -608,7 +608,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { ret = internal_header_file.store (context.internal_header_filename, null, context.version_header, false, "#ifdef __cplusplus\nextern \"C\" {\n#endif", "#ifdef __cplusplus\n}\n#endif"); } if (!ret) { - Report.error (null, "unable to open `%s' for writing".printf (context.internal_header_filename)); + Report.error (null, "unable to open `%s' for writing", context.internal_header_filename); } } @@ -815,7 +815,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { } if (!cfile.store (source_file.get_csource_filename (), source_file.filename, context.version_header, context.debug)) { - Report.error (null, "unable to open `%s' for writing".printf (source_file.get_csource_filename ())); + Report.error (null, "unable to open `%s' for writing", source_file.get_csource_filename ()); } cfile = null; @@ -2482,7 +2482,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { } if (!current_class.is_a (iface)) { - Report.warning (current_class.source_reference, "internal: `%s' is not a `%s'".printf (current_class.get_full_name (), iface.get_full_name ())); + Report.warning (current_class.source_reference, "internal: `%s' is not a `%s'", current_class.get_full_name (), iface.get_full_name ()); } var vcast = new CCodeFunctionCall (new CCodeIdentifier ("G_TYPE_INSTANCE_GET_INTERFACE")); @@ -2825,8 +2825,8 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { void require_generic_accessors (Interface iface) { if (iface.get_attribute ("GenericAccessors") == null) { Report.error (iface.source_reference, - "missing generic type for interface `%s', add GenericAccessors attribute to interface declaration" - .printf (iface.get_full_name ())); + "missing generic type for interface `%s', add GenericAccessors attribute to interface declaration", + iface.get_full_name ()); } } @@ -2872,7 +2872,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { if (is_reference_counting (type.type_symbol)) { dup_function = get_ccode_ref_function ((ObjectTypeSymbol) type.type_symbol); if (type.type_symbol is Interface && dup_function == null) { - Report.error (source_reference, "missing class prerequisite for interface `%s', add GLib.Object to interface declaration if unsure".printf (type.type_symbol.get_full_name ())); + Report.error (source_reference, "missing class prerequisite for interface `%s', add GLib.Object to interface declaration if unsure", type.type_symbol.get_full_name ()); return new CCodeInvalidExpression(); } } else if (cl != null && cl.is_immutable) { @@ -2896,7 +2896,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { } } else { // duplicating non-reference counted objects may cause side-effects (and performance issues) - Report.error (source_reference, "duplicating %s instance, use unowned variable or explicitly invoke copy method".printf (type.type_symbol.name)); + Report.error (source_reference, "duplicating %s instance, use unowned variable or explicitly invoke copy method", type.type_symbol.name); return new CCodeInvalidExpression(); } @@ -3405,7 +3405,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { if (is_reference_counting (type.type_symbol)) { unref_function = get_ccode_unref_function ((ObjectTypeSymbol) type.type_symbol); if (type.type_symbol is Interface && unref_function == null) { - Report.error (type.source_reference, "missing class prerequisite for interface `%s', add GLib.Object to interface declaration if unsure".printf (type.type_symbol.get_full_name ())); + Report.error (type.source_reference, "missing class prerequisite for interface `%s', add GLib.Object to interface declaration if unsure", type.type_symbol.get_full_name ()); return null; } } else { @@ -5952,7 +5952,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { ccode.close (); } } else { - Report.error (node.source_reference, "type `%s' does not support floating references".printf (type.type_symbol.name)); + Report.error (node.source_reference, "type `%s' does not support floating references", type.type_symbol.name); } } @@ -6023,7 +6023,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { } var type_id = get_ccode_type_id (type); if (type_id == "") { - Report.error (node.source_reference, "GValue boxing of type `%s' is not supported".printf (type.to_string ())); + Report.error (node.source_reference, "GValue boxing of type `%s' is not supported", type.to_string ()); } ccall.add_argument (new CCodeIdentifier (type_id)); ccode.add_expression (ccall); @@ -6123,7 +6123,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { // need to copy value var copy = (GLibValue) copy_value (result, node); if (target_type.type_symbol is Interface && copy == null) { - Report.error (node.source_reference, "missing class prerequisite for interface `%s', add GLib.Object to interface declaration if unsure".printf (target_type.type_symbol.get_full_name ())); + Report.error (node.source_reference, "missing class prerequisite for interface `%s', add GLib.Object to interface declaration if unsure", target_type.type_symbol.get_full_name ()); return result; } result = copy; @@ -6200,7 +6200,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { ccode.add_expression (ccall); } else { - Report.error (instance.source_reference, "internal: Invalid assignment to `%s'".printf (base_prop.get_full_name ())); + Report.error (instance.source_reference, "internal: Invalid assignment to `%s'", base_prop.get_full_name ()); } return; } @@ -6558,12 +6558,12 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { } public virtual string get_dynamic_property_getter_cname (DynamicProperty node) { - Report.error (node.source_reference, "dynamic properties are not supported for %s".printf (node.dynamic_type.to_string ())); + Report.error (node.source_reference, "dynamic properties are not supported for %s", node.dynamic_type.to_string ()); return ""; } public virtual string get_dynamic_property_setter_cname (DynamicProperty node) { - Report.error (node.source_reference, "dynamic properties are not supported for %s".printf (node.dynamic_type.to_string ())); + Report.error (node.source_reference, "dynamic properties are not supported for %s", node.dynamic_type.to_string ()); return ""; } diff --git a/codegen/valaccodecompiler.vala b/codegen/valaccodecompiler.vala index b56af71a5..cc635abfd 100644 --- a/codegen/valaccodecompiler.vala +++ b/codegen/valaccodecompiler.vala @@ -101,7 +101,7 @@ public class Vala.CCodeCompiler { int exit_status; Process.spawn_command_line_sync (cmdline, null, null, out exit_status); if (exit_status != 0) { - Report.error (null, "cc exited with status %d".printf (exit_status)); + Report.error (null, "cc exited with status %d", exit_status); } } catch (SpawnError e) { Report.error (null, e.message); diff --git a/codegen/valaccodememberaccessmodule.vala b/codegen/valaccodememberaccessmodule.vala index 3199ea24e..6d455738b 100644 --- a/codegen/valaccodememberaccessmodule.vala +++ b/codegen/valaccodememberaccessmodule.vala @@ -199,7 +199,7 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule { if (pub_inst == null && prop.binding == MemberBinding.INSTANCE) { // FIXME Report this with proper source-reference on the vala side! - Report.error (prop.source_reference, "Invalid access to instance member `%s'".printf (prop.get_full_name ())); + Report.error (prop.source_reference, "Invalid access to instance member `%s'", prop.get_full_name ()); set_cvalue (expr, new CCodeInvalidExpression ()); return; } @@ -233,7 +233,7 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule { set_cvalue (expr, ccall); } } else { - Report.error (expr.source_reference, "internal: Invalid access to `%s'".printf (base_prop.get_full_name ())); + Report.error (expr.source_reference, "internal: Invalid access to `%s'", base_prop.get_full_name ()); } } else if (prop.binding == MemberBinding.INSTANCE && prop.get_accessor.automatic_body && @@ -339,7 +339,7 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule { var owned_value_type = prop.get_accessor.value_type.copy (); owned_value_type.value_owned = true; if (requires_copy (owned_value_type)) { - Report.error (prop.get_accessor.source_reference, "unowned return value for getter of property `%s' not supported without accessor".printf (prop.get_full_name ())); + Report.error (prop.get_accessor.source_reference, "unowned return value for getter of property `%s' not supported without accessor", prop.get_full_name ()); } } @@ -632,7 +632,7 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule { if (inst == null) { // FIXME Report this with proper source-reference on the vala side! - Report.error (field.source_reference, "Invalid access to instance member `%s'".printf (field.get_full_name ())); + Report.error (field.source_reference, "Invalid access to instance member `%s'", field.get_full_name ()); result.cvalue = new CCodeInvalidExpression (); return result; } diff --git a/codegen/valaccodestructmodule.vala b/codegen/valaccodestructmodule.vala index 2098e88e5..a94f88ce1 100644 --- a/codegen/valaccodestructmodule.vala +++ b/codegen/valaccodestructmodule.vala @@ -135,7 +135,7 @@ public abstract class Vala.CCodeStructModule : CCodeBaseModule { if (get_ccode_has_type_id (st) && get_ccode_name (st).length < 3) { st.error = true; - Report.error (st.source_reference, "Name `%s' is too short for struct using GType".printf (get_ccode_name (st))); + Report.error (st.source_reference, "Name `%s' is too short for struct using GType", get_ccode_name (st)); return; } diff --git a/codegen/valagdbusclientmodule.vala b/codegen/valagdbusclientmodule.vala index 2327a09aa..af833f749 100644 --- a/codegen/valagdbusclientmodule.vala +++ b/codegen/valagdbusclientmodule.vala @@ -55,7 +55,7 @@ public class Vala.GDBusClientModule : GDBusModule { if (method.dynamic_type.type_symbol == dbus_proxy_type) { generate_marshalling (method, CallType.SYNC, null, method.name, -1); } else { - Report.error (method.source_reference, "dynamic methods are not supported for `%s'".printf (method.dynamic_type.to_string ())); + Report.error (method.source_reference, "dynamic methods are not supported for `%s'", method.dynamic_type.to_string ()); } pop_function (); @@ -274,7 +274,7 @@ public class Vala.GDBusClientModule : GDBusModule { var iface = (Interface) object_type.type_symbol; if (get_dbus_name (iface) == null) { - Report.error (expr.source_reference, "`%s' is not a D-Bus interface".printf (iface.get_full_name ())); + Report.error (expr.source_reference, "`%s' is not a D-Bus interface", iface.get_full_name ()); return; } diff --git a/codegen/valagdbusservermodule.vala b/codegen/valagdbusservermodule.vala index 6eca1d14a..06166772e 100644 --- a/codegen/valagdbusservermodule.vala +++ b/codegen/valagdbusservermodule.vala @@ -1125,7 +1125,7 @@ public class Vala.GDBusServerModule : GDBusClientModule { var ref_function = get_ccode_ref_function (sym); if (sym is Interface && ref_function == null) { - Report.error (sym.source_reference, "missing class prerequisite for interface `%s', add GLib.Object to interface declaration if unsure".printf (sym.get_full_name ())); + Report.error (sym.source_reference, "missing class prerequisite for interface `%s', add GLib.Object to interface declaration if unsure", sym.get_full_name ()); return; } diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala index a76b71bac..eea87bc3e 100644 --- a/codegen/valagirwriter.vala +++ b/codegen/valagirwriter.vala @@ -183,7 +183,7 @@ public class Vala.GIRWriter : CodeVisitor { } if (stream == null) { - Report.error (null, "unable to open `%s' for writing".printf (filename)); + Report.error (null, "unable to open `%s' for writing", filename); this.context = null; return; } @@ -235,7 +235,7 @@ public class Vala.GIRWriter : CodeVisitor { foreach (var ns in unannotated_namespaces) { if (!our_namespaces.contains(ns)) { - Report.warning (ns.source_reference, "Namespace %s does not have a GIR namespace and version annotation".printf (ns.name)); + Report.warning (ns.source_reference, "Namespace `%s' does not have a GIR namespace and version annotation", ns.name); } } foreach (var ns in our_namespaces) { @@ -333,7 +333,7 @@ public class Vala.GIRWriter : CodeVisitor { } if (our_namespaces.size > 0) { - Report.error (ns.source_reference, "Secondary top-level namespace `%s' is not supported by GIR format".printf (ns.name)); + Report.error (ns.source_reference, "Secondary top-level namespace `%s' is not supported by GIR format", ns.name); return; } @@ -1777,7 +1777,7 @@ public class Vala.GIRWriter : CodeVisitor { return true; } - Report.warning (sym.source_reference, "`%s' must be part of namespace to be included in GIR".printf (sym.name)); + Report.warning (sym.source_reference, "`%s' must be part of namespace to be included in GIR", sym.name); return false; } } diff --git a/codegen/valagobjectmodule.vala b/codegen/valagobjectmodule.vala index 71014ade0..54b1d4401 100644 --- a/codegen/valagobjectmodule.vala +++ b/codegen/valagobjectmodule.vala @@ -136,7 +136,7 @@ public class Vala.GObjectModule : GTypeModule { foreach (Property prop in props) { if (!context.analyzer.is_gobject_property (prop)) { if (!context.analyzer.is_gobject_property_type (prop.property_type)) { - Report.warning (prop.source_reference, "Type `%s' can not be used for a GLib.Object property".printf (prop.property_type.to_qualified_string ())); + Report.warning (prop.source_reference, "Type `%s' can not be used for a GLib.Object property", prop.property_type.to_qualified_string ()); } continue; } @@ -839,15 +839,15 @@ public class Vala.GObjectModule : GTypeModule { } var prop = SemanticAnalyzer.symbol_lookup_inherited (current_class, named_argument.name) as Property; if (prop == null) { - Report.error (arg.source_reference, "Property `%s' not found in `%s'".printf (named_argument.name, current_class.get_full_name ())); + Report.error (arg.source_reference, "Property `%s' not found in `%s'", named_argument.name, current_class.get_full_name ()); break; } if (!context.analyzer.is_gobject_property (prop)) { - Report.error (arg.source_reference, "Property `%s' not supported in Object (property: value) constructor chain up".printf (named_argument.name)); + Report.error (arg.source_reference, "Property `%s' not supported in Object (property: value) constructor chain up", named_argument.name); break; } if (!arg.value_type.compatible (prop.property_type)) { - Report.error (arg.source_reference, "Cannot convert from `%s' to `%s'".printf (arg.value_type.to_string (), prop.property_type.to_string ())); + Report.error (arg.source_reference, "Cannot convert from `%s' to `%s'", arg.value_type.to_string (), prop.property_type.to_string ()); break; } } diff --git a/codegen/valagtkmodule.vala b/codegen/valagtkmodule.vala index f78b39203..8b2e88da1 100644 --- a/codegen/valagtkmodule.vala +++ b/codegen/valagtkmodule.vala @@ -96,7 +96,7 @@ public class Vala.GtkModule : GSignalModule { gresource_to_file_map = new HashMap<string, string>(str_hash, str_equal); foreach (var gresource in context.gresources) { if (!FileUtils.test (gresource, FileTest.EXISTS)) { - Report.error (null, "GResources file `%s' does not exist".printf (gresource)); + Report.error (null, "GResources file `%s' does not exist", gresource); continue; } @@ -139,7 +139,7 @@ public class Vala.GtkModule : GSignalModule { var ui_file = gresource_to_file_map.get (ui_resource); if (ui_file == null || !FileUtils.test (ui_file, FileTest.EXISTS)) { node.error = true; - Report.error (node.source_reference, "UI resource not found: `%s'. Please make sure to specify the proper GResources xml files with --gresources and alternative search locations with --gresourcesdir.".printf (ui_resource)); + Report.error (node.source_reference, "UI resource not found: `%s'. Please make sure to specify the proper GResources xml files with --gresources and alternative search locations with --gresourcesdir.", ui_resource); return; } current_handler_to_signal_map = new HashMap<string, Signal>(str_hash, str_equal); @@ -168,7 +168,7 @@ public class Vala.GtkModule : GSignalModule { if (current_class == null) { var class_name = reader.get_attribute ("class"); if (class_name == null) { - Report.error (node.source_reference, "Invalid %s in ui file `%s'".printf (current_name, ui_file)); + Report.error (node.source_reference, "Invalid %s in ui file `%s'", current_name, ui_file); current_token = reader.read_token (null, null); continue; } @@ -187,7 +187,7 @@ public class Vala.GtkModule : GSignalModule { if (current_class != null) { if (signal_name == null || handler_name == null) { - Report.error (node.source_reference, "Invalid signal in ui file `%s'".printf (ui_file)); + Report.error (node.source_reference, "Invalid signal in ui file `%s'", ui_file); current_token = reader.read_token (null, null); continue; } @@ -205,7 +205,7 @@ public class Vala.GtkModule : GSignalModule { } else if (current_class != null && current_token == MarkupTokenType.START_ELEMENT && current_name == "binding") { var property_name = reader.get_attribute ("name"); if (property_name == null) { - Report.error (node.source_reference, "Invalid binding in ui file `%s'".printf (ui_file)); + Report.error (node.source_reference, "Invalid binding in ui file `%s'", ui_file); current_token = reader.read_token (null, null); continue; } @@ -213,7 +213,7 @@ public class Vala.GtkModule : GSignalModule { property_name = property_name.replace ("-", "_"); current_property = SemanticAnalyzer.symbol_lookup_inherited (current_class, property_name) as Property; if (current_property == null) { - Report.error (node.source_reference, "Unknown property `%s:%s' for binding in ui file `%s'".printf (current_class.get_full_name (), property_name, ui_file)); + Report.error (node.source_reference, "Unknown property `%s:%s' for binding in ui file `%s'", current_class.get_full_name (), property_name, ui_file); current_token = reader.read_token (null, null); continue; } @@ -222,7 +222,7 @@ public class Vala.GtkModule : GSignalModule { if (current_property != null) { if (handler_name == null) { - Report.error (node.source_reference, "Invalid closure in ui file `%s'".printf (ui_file)); + Report.error (node.source_reference, "Invalid closure in ui file `%s'", ui_file); current_token = reader.read_token (null, null); continue; } @@ -236,7 +236,7 @@ public class Vala.GtkModule : GSignalModule { } if (!template_tag_found) { - Report.error (node.source_reference, "ui resource `%s' does not describe a valid composite template".printf (ui_resource)); + Report.error (node.source_reference, "ui resource `%s' does not describe a valid composite template", ui_resource); } } @@ -313,14 +313,14 @@ public class Vala.GtkModule : GSignalModule { var gtk_name = f.get_attribute_string ("GtkChild", "name", f.name); var child_class = current_child_to_class_map.get (gtk_name); if (child_class == null) { - Report.error (f.source_reference, "could not find child `%s'".printf (gtk_name)); + Report.error (f.source_reference, "could not find child `%s'", gtk_name); return; } /* We allow Gtk child to have stricter type than class field */ unowned Class? field_class = f.variable_type.type_symbol as Class; if (field_class == null || !child_class.is_subtype_of (field_class)) { - Report.error (f.source_reference, "cannot convert from Gtk child type `%s' to `%s'".printf (child_class.get_full_name(), field_class.get_full_name())); + Report.error (f.source_reference, "cannot convert from Gtk child type `%s' to `%s'", child_class.get_full_name(), field_class.get_full_name()); return; } @@ -371,7 +371,7 @@ public class Vala.GtkModule : GSignalModule { var sig = current_handler_to_signal_map.get (handler_name); var prop = current_handler_to_property_map.get (handler_name); if (sig == null && prop == null) { - Report.error (m.source_reference, "could not find signal or property for handler `%s'".printf (handler_name)); + Report.error (m.source_reference, "could not find signal or property for handler `%s'", handler_name); return; } @@ -383,7 +383,7 @@ public class Vala.GtkModule : GSignalModule { var signal_type = new SignalType (sig); var delegate_type = signal_type.get_handler_type (); if (!method_type.compatible (delegate_type)) { - Report.error (m.source_reference, "method `%s' is incompatible with signal `%s', expected `%s'".printf (method_type.to_string (), delegate_type.to_string (), delegate_type.to_prototype_string (m.name))); + Report.error (m.source_reference, "method `%s' is incompatible with signal `%s', expected `%s'", method_type.to_string (), delegate_type.to_string (), delegate_type.to_prototype_string (m.name)); } else { var wrapper = generate_delegate_wrapper (m, signal_type.get_handler_type (), m); diff --git a/codegen/valagtypemodule.vala b/codegen/valagtypemodule.vala index 8a8862a71..d9fbaba65 100644 --- a/codegen/valagtypemodule.vala +++ b/codegen/valagtypemodule.vala @@ -595,7 +595,7 @@ public class Vala.GTypeModule : GErrorModule { if (get_ccode_name (cl).length < 3) { cl.error = true; - Report.error (cl.source_reference, "Class name `%s' is too short".printf (get_ccode_name (cl))); + Report.error (cl.source_reference, "Class name `%s' is too short", get_ccode_name (cl)); return; } @@ -2154,7 +2154,7 @@ public class Vala.GTypeModule : GErrorModule { if (get_ccode_name (iface).length < 3) { iface.error = true; - Report.error (iface.source_reference, "Interface name `%s' is too short".printf (get_ccode_name (iface))); + Report.error (iface.source_reference, "Interface name `%s' is too short", get_ccode_name (iface)); return; } diff --git a/codegen/valagvariantmodule.vala b/codegen/valagvariantmodule.vala index bd45a7738..03a7193aa 100644 --- a/codegen/valagvariantmodule.vala +++ b/codegen/valagvariantmodule.vala @@ -575,7 +575,7 @@ public class Vala.GVariantModule : GValueModule { } if (result == null) { - Report.error (type.source_reference, "GVariant deserialization of type `%s' is not supported".printf (type.to_string ())); + Report.error (type.source_reference, "GVariant deserialization of type `%s' is not supported", type.to_string ()); return new CCodeInvalidExpression (); } @@ -868,7 +868,7 @@ public class Vala.GVariantModule : GValueModule { } if (result == null) { - Report.error (type.source_reference, "GVariant serialization of type `%s' is not supported".printf (type.to_string ())); + Report.error (type.source_reference, "GVariant serialization of type `%s' is not supported", type.to_string ()); return new CCodeInvalidExpression (); } |