summaryrefslogtreecommitdiff
path: root/codegen/valaccodemethodmodule.vala
diff options
context:
space:
mode:
Diffstat (limited to 'codegen/valaccodemethodmodule.vala')
-rw-r--r--codegen/valaccodemethodmodule.vala8
1 files changed, 4 insertions, 4 deletions
diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala
index 9506fe6de..c9731a1ca 100644
--- a/codegen/valaccodemethodmodule.vala
+++ b/codegen/valaccodemethodmodule.vala
@@ -93,13 +93,13 @@ 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"), "gpointer*");
+ var cparam = new CCodeParameter (get_delegate_target_cname ("result"), get_ccode_name (delegate_target_type) + "*");
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));
}
if (deleg_type.is_disposable ()) {
- cparam = new CCodeParameter (get_delegate_target_destroy_notify_cname ("result"), "GDestroyNotify*");
+ cparam = new CCodeParameter (get_delegate_target_destroy_notify_cname ("result"), get_ccode_name (delegate_target_destroy_type) + "*");
cparam_map.set (get_param_pos (get_ccode_delegate_target_pos (m) + 0.01), cparam);
if (carg_map != null) {
carg_map.set (get_param_pos (get_ccode_delegate_target_pos (m) + 0.01), get_variable_cexpression (cparam.name));
@@ -590,11 +590,11 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
if (deleg_type.delegate_symbol.has_target) {
// create variable to store delegate target
vardecl = new CCodeVariableDeclarator.zero ("_vala_%s".printf (get_ccode_delegate_target_name (param)), new CCodeConstant ("NULL"));
- ccode.add_declaration ("void *", vardecl);
+ ccode.add_declaration (get_ccode_name (delegate_target_type), vardecl);
if (deleg_type.is_disposable ()) {
vardecl = new CCodeVariableDeclarator.zero (get_delegate_target_destroy_notify_cname (get_variable_cname ("_vala_%s".printf (param.name))), new CCodeConstant ("NULL"));
- ccode.add_declaration ("GDestroyNotify", vardecl);
+ ccode.add_declaration (get_ccode_name (delegate_target_destroy_type), vardecl);
}
}
}