summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent dot torri at gmail dot com>2015-10-08 22:32:57 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-10-12 17:21:59 -0700
commita4542b245768d48ae419bbfb87d5217c699bcc26 (patch)
tree8df1392a1419f61a8731a80316473fdb2d260f89
parent18cbdad446037a9afdc1259c06b4190a71dc3b7d (diff)
ecore: mimic UNIX code even more
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/ecore/ecore_main.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 04a65bc223..97ddf5a895 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -1172,9 +1172,25 @@ unlock:
1172} 1172}
1173 1173
1174#ifdef _WIN32 1174#ifdef _WIN32
1175static void *
1176_ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler)
1177{
1178 if (win32_handler->delete_me)
1179 {
1180 ERR("win32 handler %p deleted twice", win32_handler);
1181 return NULL;
1182 }
1183
1184 win32_handler->delete_me = EINA_TRUE;
1185 win32_handlers_to_delete = eina_list_append(win32_handlers_to_delete, win32_handler);
1186 return win32_handler->data;
1187}
1188
1175EAPI void * 1189EAPI void *
1176ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler) 1190ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler)
1177{ 1191{
1192 void *ret = NULL;
1193
1178 if (!win32_handler) return NULL; 1194 if (!win32_handler) return NULL;
1179 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); 1195 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
1180 if (!ECORE_MAGIC_CHECK(win32_handler, ECORE_MAGIC_WIN32_HANDLER)) 1196 if (!ECORE_MAGIC_CHECK(win32_handler, ECORE_MAGIC_WIN32_HANDLER))
@@ -1183,14 +1199,8 @@ ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler)
1183 "ecore_main_win32_handler_del"); 1199 "ecore_main_win32_handler_del");
1184 return NULL; 1200 return NULL;
1185 } 1201 }
1186 if (win32_handler->delete_me) 1202 ret = _ecore_main_win32_handler_del(win32_handler);
1187 { 1203 return ret;
1188 ERR("win32 handler %p deleted twice", win32_handler);
1189 return NULL;
1190 }
1191 win32_handler->delete_me = EINA_TRUE;
1192 win32_handlers_to_delete = eina_list_append(win32_handlers_to_delete, win32_handler);
1193 return win32_handler->data;
1194} 1204}
1195 1205
1196#else 1206#else