cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a4542b245768d48ae419bbfb87d5217c699bcc26

commit a4542b245768d48ae419bbfb87d5217c699bcc26
Author: Vincent Torri <vincent dot torri at gmail dot com>
Date:   Thu Oct 8 22:32:57 2015 +0200

    ecore: mimic UNIX code even more
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/ecore/ecore_main.c | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 04a65bc..97ddf5a 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -1172,9 +1172,25 @@ unlock:
 }
 
 #ifdef _WIN32
+static void *
+_ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler)
+{
+   if (win32_handler->delete_me)
+     {
+        ERR("win32 handler %p deleted twice", win32_handler);
+        return NULL;
+     }
+
+   win32_handler->delete_me = EINA_TRUE;
+   win32_handlers_to_delete = eina_list_append(win32_handlers_to_delete, 
win32_handler);
+   return win32_handler->data;
+}
+
 EAPI void *
 ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler)
 {
+   void *ret = NULL;
+
    if (!win32_handler) return NULL;
    EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
    if (!ECORE_MAGIC_CHECK(win32_handler, ECORE_MAGIC_WIN32_HANDLER))
@@ -1183,14 +1199,8 @@ ecore_main_win32_handler_del(Ecore_Win32_Handler 
*win32_handler)
                          "ecore_main_win32_handler_del");
         return NULL;
      }
-   if (win32_handler->delete_me)
-     {
-        ERR("win32 handler %p deleted twice", win32_handler);
-        return NULL;
-     }
-   win32_handler->delete_me = EINA_TRUE;
-   win32_handlers_to_delete = eina_list_append(win32_handlers_to_delete, 
win32_handler);
-   return win32_handler->data;
+   ret = _ecore_main_win32_handler_del(win32_handler);
+   return ret;
 }
 
 #else

-- 


Reply via email to