From 11fb54e4bc7daa3378649bd68d668b0cf614839b Mon Sep 17 00:00:00 2001 From: Yeongjong Lee Date: Thu, 31 Oct 2019 18:21:42 -0300 Subject: [PATCH] mono: remove duplicated EinaFreeCb delegate Summary: Use Eina.Claabacks.EinaFreeCb instead. Reviewers: lauromoura Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10577 --- src/bin/eolian_mono/eolian/mono/function_pointer.hh | 4 ++-- src/bin/eolian_mono/eolian/mono/parameter.hh | 2 +- src/bindings/mono/eo_mono/iwrapper.cs | 4 ++-- src/bindings/mono/eo_mono/workaround.cs | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/bin/eolian_mono/eolian/mono/function_pointer.hh b/src/bin/eolian_mono/eolian/mono/function_pointer.hh index 0baab70e41..0e80659b48 100644 --- a/src/bin/eolian_mono/eolian/mono/function_pointer.hh +++ b/src/bin/eolian_mono/eolian/mono/function_pointer.hh @@ -76,9 +76,9 @@ struct function_pointer { << "{\n\n" << scope_tab << "private " << f_name << "Internal _cb;\n" << scope_tab << "private IntPtr _cb_data;\n" - << scope_tab << "private EinaFreeCb _cb_free_cb;\n\n" + << scope_tab << "private Eina.Callbacks.EinaFreeCb _cb_free_cb;\n\n" - << scope_tab << "internal " << f_name << "Wrapper (" << f_name << "Internal _cb, IntPtr _cb_data, EinaFreeCb _cb_free_cb)\n" + << scope_tab << "internal " << f_name << "Wrapper (" << f_name << "Internal _cb, IntPtr _cb_data, Eina.Callbacks.EinaFreeCb _cb_free_cb)\n" << scope_tab << "{\n" << scope_tab << scope_tab << "this._cb = _cb;\n" << scope_tab << scope_tab << "this._cb_data = _cb_data;\n" diff --git a/src/bin/eolian_mono/eolian/mono/parameter.hh b/src/bin/eolian_mono/eolian/mono/parameter.hh index 38afef8cb5..55e12544ad 100644 --- a/src/bin/eolian_mono/eolian/mono/parameter.hh +++ b/src/bin/eolian_mono/eolian/mono/parameter.hh @@ -494,7 +494,7 @@ struct marshall_parameter_generator ).generate(sink, std::make_tuple(param, param_name), context); return as_generator( - "IntPtr " << param_name << "_data, " << type << "Internal " << param_name << ", EinaFreeCb " + "IntPtr " << param_name << "_data, " << type << "Internal " << param_name << ", Eina.Callbacks.EinaFreeCb " << param_name << "_free_cb" ).generate(sink, param, context); } diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs index db4213d3ec..12a7b3262f 100644 --- a/src/bindings/mono/eo_mono/iwrapper.cs +++ b/src/bindings/mono/eo_mono/iwrapper.cs @@ -738,9 +738,9 @@ public static class Globals efl_mono_wrapper_supervisor_callbacks_set(FreeWrapperSupervisorCallbackDelegate); } - internal static void ThreadSafeFreeCbExec(EinaFreeCb cbFreeCb, IntPtr cbData) + internal static void ThreadSafeFreeCbExec(Eina.Callbacks.EinaFreeCb cbFreeCb, IntPtr cbData) { - EinaFreeCb cb = (IntPtr gcHandlePtr) => { + Eina.Callbacks.EinaFreeCb cb = (IntPtr gcHandlePtr) => { cbFreeCb(cbData); GCHandle gcHandle = GCHandle.FromIntPtr(gcHandlePtr); gcHandle.Free(); diff --git a/src/bindings/mono/eo_mono/workaround.cs b/src/bindings/mono/eo_mono/workaround.cs index 7730545092..66c3ec5879 100644 --- a/src/bindings/mono/eo_mono/workaround.cs +++ b/src/bindings/mono/eo_mono/workaround.cs @@ -232,5 +232,4 @@ public struct ActionData } // namespace Efl // Global delegates -public delegate void EinaFreeCb(IntPtr data); public delegate void EvasSmartCb(IntPtr data, IntPtr obj, IntPtr event_info);