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



commit d8ce555e7b3359b77af33e6ae91e0b4714f682b1
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 f97420f..a1a054d 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]