From: Rico Tzschichholz Date: Tue, 6 Feb 2018 16:52:55 +0000 (+0100) Subject: codegen: Fix GDestroyNotify of delegate parameters in delegate declaration X-Git-Tag: 0.34.17~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8ce555e7b3359b77af33e6ae91e0b4714f682b1;p=thirdparty%2Fvala.git codegen: Fix GDestroyNotify of delegate parameters in delegate declaration delegate void Func (owned Func func); incompatible pointer type: expected ‘void (**)(void *)’ but argument is of type ‘GDestroyNotify {aka void (*)(void *)}’ https://bugzilla.gnome.org/show_bug.cgi?id=639059 --- diff --git a/codegen/valaccodedelegatemodule.vala b/codegen/valaccodedelegatemodule.vala index f97420f43..a1a054df1 100644 --- a/codegen/valaccodedelegatemodule.vala +++ b/codegen/valaccodedelegatemodule.vala @@ -74,7 +74,7 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule { cparam = new CCodeParameter (get_delegate_target_cname (get_variable_cname (param.name)), "void*"); cfundecl.add_parameter (cparam); if (deleg_type.is_disposable ()) { - cparam = new CCodeParameter (get_delegate_target_destroy_notify_cname (get_variable_cname (param.name)), "GDestroyNotify*"); + cparam = new CCodeParameter (get_delegate_target_destroy_notify_cname (get_variable_cname (param.name)), "GDestroyNotify"); cfundecl.add_parameter (cparam); } }