[vala/0.36: 171/212] codegen: Fix GDestroyNotify of delegate parameters in delegate declaration



commit 300a2985d30b577c8baf70fe068f997e7d7013b1
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 abb8892..30a2e4b 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);
                                        }
                                }


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