Commit f167b6fe authored by Rico Tzschichholz's avatar Rico Tzschichholz

codegen: Consistently use gpointer for delegate targets

parent 8af8158c
......@@ -76,7 +76,7 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
var deleg_type = (DelegateType) param.variable_type;
var param_d = deleg_type.delegate_symbol;
if (param_d.has_target) {
cparam = new CCodeParameter (get_delegate_target_cname (get_variable_cname (param.name)), "void*");
cparam = new CCodeParameter (get_delegate_target_cname (get_variable_cname (param.name)), "gpointer");
cfundecl.add_parameter (cparam);
if (deleg_type.is_disposable ()) {
cparam = new CCodeParameter (get_delegate_target_destroy_notify_cname (get_variable_cname (param.name)), "GDestroyNotify");
......@@ -100,7 +100,7 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
var deleg_type = (DelegateType) d.return_type;
var result_d = deleg_type.delegate_symbol;
if (result_d.has_target) {
var cparam = new CCodeParameter (get_delegate_target_cname ("result"), "void**");
var cparam = new CCodeParameter (get_delegate_target_cname ("result"), "gpointer*");
cfundecl.add_parameter (cparam);
if (deleg_type.is_disposable ()) {
cparam = new CCodeParameter (get_delegate_target_destroy_notify_cname ("result"), "GDestroyNotify*");
......@@ -112,7 +112,7 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
cfundecl.add_parameter (cparam);
}
if (d.has_target) {
var cparam = new CCodeParameter ("user_data", "void*");
var cparam = new CCodeParameter ("user_data", "gpointer");
cfundecl.add_parameter (cparam);
}
if (d.get_error_types ().size > 0) {
......@@ -251,7 +251,7 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
var deleg_type = (DelegateType) d.return_type;
if (deleg_type.delegate_symbol.has_target) {
var cparam = new CCodeParameter (get_delegate_target_cname ("result"), "void**");
var cparam = new CCodeParameter (get_delegate_target_cname ("result"), "gpointer*");
cparam_map.set (get_param_pos (get_ccode_delegate_target_pos (d)), cparam);
if (deleg_type.is_disposable ()) {
cparam = new CCodeParameter (get_delegate_target_destroy_notify_cname ("result"), "GDestroyNotify*");
......@@ -465,7 +465,7 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
}
string ctypename = get_ccode_name (param.variable_type);
string target_ctypename = "void*";
string target_ctypename = "gpointer";
string target_destroy_notify_ctypename = "GDestroyNotify";
if (param.parent_symbol is Delegate
......
......@@ -94,7 +94,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
// return delegate target if appropriate
var deleg_type = (DelegateType) m.return_type;
if (deleg_type.delegate_symbol.has_target) {
var cparam = new CCodeParameter (get_delegate_target_cname ("result"), "void**");
var cparam = new CCodeParameter (get_delegate_target_cname ("result"), "gpointer*");
cparam_map.set (get_param_pos (get_ccode_delegate_target_pos (m)), cparam);
if (carg_map != null) {
carg_map.set (get_param_pos (get_ccode_delegate_target_pos (m)), get_variable_cexpression (cparam.name));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment