]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Fix GDestroyNotify of delegate parameters in delegate declaration
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 6 Feb 2018 16:52:55 +0000 (17:52 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 9 Feb 2018 07:23:39 +0000 (08:23 +0100)
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

codegen/valaccodedelegatemodule.vala

index f97420f4310ff905c1d3a97b21d3e5f60228c244..a1a054df17926ababd33a33d894ce6eafdf96ba8 100644 (file)
@@ -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);
                                        }
                                }