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.39.91~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc0d1083479a650a46048c9729a96c42a98cc71e;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 5c4e39747..13a402568 100644 --- a/codegen/valaccodedelegatemodule.vala +++ b/codegen/valaccodedelegatemodule.vala @@ -79,7 +79,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); } }