]> 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>
Tue, 6 Feb 2018 17:01:12 +0000 (18:01 +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 5c4e397476039644377adb94c7c9c16f8bdf13cd..13a40256826ede712a868f8eb458ba8f66256b46 100644 (file)
@@ -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);
                                        }
                                }