[vala/staging] codegen: Fix GDestroyNotify of delegate parameters in delegate declaration



commit dc0d1083479a650a46048c9729a96c42a98cc71e
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Tue Feb 6 17:52:55 2018 +0100

    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

 codegen/valaccodedelegatemodule.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodedelegatemodule.vala b/codegen/valaccodedelegatemodule.vala
index 5c4e397..13a4025 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);
                                        }
                                }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]