[vala/staging] codegen: Add missing data parameter to GTypeInfo callbacks
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] codegen: Add missing data parameter to GTypeInfo callbacks
- Date: Sat, 5 Jan 2019 21:18:17 +0000 (UTC)
commit b5260359255637d77ebc367d26c853ac6459f67d
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Nov 25 22:13:01 2018 +0100
codegen: Add missing data parameter to GTypeInfo callbacks
Found by -Werror=cast-function-type
codegen/valaccodemethodcallmodule.vala | 1 +
codegen/valaccodemethodmodule.vala | 1 +
codegen/valagtypemodule.vala | 5 +++++
3 files changed, 7 insertions(+)
---
diff --git a/codegen/valaccodemethodcallmodule.vala b/codegen/valaccodemethodcallmodule.vala
index a2628a783..9086268e8 100644
--- a/codegen/valaccodemethodcallmodule.vala
+++ b/codegen/valaccodemethodcallmodule.vala
@@ -880,6 +880,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
if (m is CreationMethod && m.parent_symbol is Class && ((current_class.is_compact &&
current_class.base_class != null) || current_class.base_class == gsource_type)) {
var cinitcall = new CCodeFunctionCall (new CCodeIdentifier ("%s_instance_init".printf
(get_ccode_lower_case_name (current_class, null))));
cinitcall.add_argument (get_this_cexpression ());
+ cinitcall.add_argument (new CCodeConstant ("NULL"));
ccode.add_expression (cinitcall);
}
}
diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala
index 8d75c5dd6..fef66ef32 100644
--- a/codegen/valaccodemethodmodule.vala
+++ b/codegen/valaccodemethodmodule.vala
@@ -661,6 +661,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
if (cl.base_class == null) {
var cinitcall = new CCodeFunctionCall (new
CCodeIdentifier ("%s_instance_init".printf (get_ccode_lower_case_name (cl, null))));
cinitcall.add_argument (get_this_cexpression ());
+ cinitcall.add_argument (new CCodeConstant ("NULL"));
ccode.add_expression (cinitcall);
}
} else {
diff --git a/codegen/valagtypemodule.vala b/codegen/valagtypemodule.vala
index 2fe134a79..bf5ab237d 100644
--- a/codegen/valagtypemodule.vala
+++ b/codegen/valagtypemodule.vala
@@ -1264,6 +1264,7 @@ public class Vala.GTypeModule : GErrorModule {
var func = new CCodeFunction ("%s_class_init".printf (get_ccode_lower_case_name (cl, null)));
func.add_parameter (new CCodeParameter ("klass", "%sClass *".printf (get_ccode_name (cl))));
+ func.add_parameter (new CCodeParameter ("klass_data", "gpointer"));
func.modifiers = CCodeModifiers.STATIC;
CCodeFunctionCall ccall;
@@ -1400,6 +1401,7 @@ public class Vala.GTypeModule : GErrorModule {
private void add_interface_init_function (Class cl, Interface iface) {
var iface_init = new CCodeFunction ("%s_%s_interface_init".printf (get_ccode_lower_case_name
(cl), get_ccode_lower_case_name (iface)), "void");
iface_init.add_parameter (new CCodeParameter ("iface", "%s *".printf (get_ccode_type_name
(iface))));
+ iface_init.add_parameter (new CCodeParameter ("iface_data", "gpointer"));
iface_init.modifiers = CCodeModifiers.STATIC;
push_function (iface_init);
@@ -1635,6 +1637,7 @@ public class Vala.GTypeModule : GErrorModule {
var func = new CCodeFunction ("%s_instance_init".printf (get_ccode_lower_case_name (cl,
null)));
func.add_parameter (new CCodeParameter ("self", "%s *".printf (get_ccode_name (cl))));
+ func.add_parameter (new CCodeParameter ("klass", "gpointer"));
func.modifiers = CCodeModifiers.STATIC;
push_function (func);
@@ -1736,6 +1739,7 @@ public class Vala.GTypeModule : GErrorModule {
function.modifiers = CCodeModifiers.STATIC;
function.add_parameter (new CCodeParameter ("klass", "%sClass *".printf (get_ccode_name
(cl))));
+ function.add_parameter (new CCodeParameter ("klass_data", "gpointer"));
push_function (function);
@@ -2261,6 +2265,7 @@ public class Vala.GTypeModule : GErrorModule {
var default_init = new CCodeFunction ("%s_default_init".printf (get_ccode_lower_case_name
(iface, null)), "void");
default_init.add_parameter (new CCodeParameter ("iface", "%sIface *".printf (get_ccode_name
(iface))));
+ default_init.add_parameter (new CCodeParameter ("iface_data", "gpointer"));
default_init.modifiers = CCodeModifiers.STATIC;
push_function (default_init);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]