summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-11-09 23:38:50 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-11-09 23:38:50 +0100
commita0df88240d056c99b47350efb402fe91110597b3 (patch)
treec4fbca61069f8c3ad2134e168ef18f1ee3457b0e
parent5b07eec6dd8b75d3fbc648cb4bb723d2af5dbab5 (diff)
wip-port
-rw-r--r--src/lib/eo/eo_base_class.c189
-rw-r--r--src/tests/eo/suite/eo_test_event.c18
-rw-r--r--src/tests/eo/suite/eo_test_general.c4
3 files changed, 72 insertions, 139 deletions
diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 928811abcb..bdc1192c0d 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -12,6 +12,7 @@
12#include "eo_ptr_indirection.h" 12#include "eo_ptr_indirection.h"
13#include "eo_private.h" 13#include "eo_private.h"
14#include "eina_promise_private.h" 14#include "eina_promise_private.h"
15#include "eo_event_emitter.h"
15 16
16#define EFL_EVENT_SPECIAL_SKIP 1 17#define EFL_EVENT_SPECIAL_SKIP 1
17 18
@@ -51,7 +52,7 @@ struct _Efl_Object_Data
51 Efl_Object_Extension *ext; 52 Efl_Object_Extension *ext;
52 53
53 Eina_Inlist *current; 54 Eina_Inlist *current;
54 55 Eo_Event_Emitter emitter;
55 Efl_Event_Callback_Frame *event_frame; 56 Efl_Event_Callback_Frame *event_frame;
56 Eo_Callback_Description **callbacks; 57 Eo_Callback_Description **callbacks;
57 Eina_Inlist *pending_futures; 58 Eina_Inlist *pending_futures;
@@ -1169,30 +1170,30 @@ _efl_pending_future_new(void)
1169#define CB_COUNT_DEC(cnt) do { if ((cnt) != 0xffff) (cnt)--; } while(0) 1170#define CB_COUNT_DEC(cnt) do { if ((cnt) != 0xffff) (cnt)--; } while(0)
1170 1171
1171static inline void 1172static inline void
1172_special_event_count_inc(Efl_Object_Data *pd, const Efl_Callback_Array_Item *it) 1173_special_event_count_inc(Efl_Object_Data *pd, const Efl_Event_Description *desc)
1173{ 1174{
1174 if (it->desc == EFL_EVENT_CALLBACK_ADD) 1175 if (desc == EFL_EVENT_CALLBACK_ADD)
1175 CB_COUNT_INC(pd->event_cb_efl_event_callback_add_count); 1176 CB_COUNT_INC(pd->event_cb_efl_event_callback_add_count);
1176 else if (it->desc == EFL_EVENT_CALLBACK_DEL) 1177 else if (desc == EFL_EVENT_CALLBACK_DEL)
1177 CB_COUNT_INC(pd->event_cb_efl_event_callback_del_count); 1178 CB_COUNT_INC(pd->event_cb_efl_event_callback_del_count);
1178 else if (it->desc == EFL_EVENT_DEL) 1179 else if (desc == EFL_EVENT_DEL)
1179 CB_COUNT_INC(pd->event_cb_efl_event_del_count); 1180 CB_COUNT_INC(pd->event_cb_efl_event_del_count);
1180 else if (it->desc == EFL_EVENT_NOREF) 1181 else if (desc == EFL_EVENT_NOREF)
1181 CB_COUNT_INC(pd->event_cb_efl_event_noref_count); 1182 CB_COUNT_INC(pd->event_cb_efl_event_noref_count);
1182 else if (it->desc == EFL_EVENT_DESTRUCT) 1183 else if (desc == EFL_EVENT_DESTRUCT)
1183 pd->has_destroyed_event_cb = EINA_TRUE; 1184 pd->has_destroyed_event_cb = EINA_TRUE;
1184} 1185}
1185 1186
1186static inline void 1187static inline void
1187_special_event_count_dec(Efl_Object_Data *pd, const Efl_Callback_Array_Item *it) 1188_special_event_count_dec(Efl_Object_Data *pd, const Efl_Event_Description *desc)
1188{ 1189{
1189 if (it->desc == EFL_EVENT_CALLBACK_ADD) 1190 if (desc == EFL_EVENT_CALLBACK_ADD)
1190 CB_COUNT_DEC(pd->event_cb_efl_event_callback_add_count); 1191 CB_COUNT_DEC(pd->event_cb_efl_event_callback_add_count);
1191 else if (it->desc == EFL_EVENT_CALLBACK_DEL) 1192 else if (desc == EFL_EVENT_CALLBACK_DEL)
1192 CB_COUNT_DEC(pd->event_cb_efl_event_callback_del_count); 1193 CB_COUNT_DEC(pd->event_cb_efl_event_callback_del_count);
1193 else if (it->desc == EFL_EVENT_DEL) 1194 else if (desc == EFL_EVENT_DEL)
1194 CB_COUNT_DEC(pd->event_cb_efl_event_del_count); 1195 CB_COUNT_DEC(pd->event_cb_efl_event_del_count);
1195 else if (it->desc == EFL_EVENT_NOREF) 1196 else if (desc == EFL_EVENT_NOREF)
1196 CB_COUNT_DEC(pd->event_cb_efl_event_noref_count); 1197 CB_COUNT_DEC(pd->event_cb_efl_event_noref_count);
1197} 1198}
1198#endif 1199#endif
@@ -1208,9 +1209,9 @@ _eo_callback_remove(Efl_Object_Data *pd, Eo_Callback_Description **cb)
1208 if ((*cb)->func_array) 1209 if ((*cb)->func_array)
1209 { 1210 {
1210 for (it = (*cb)->items.item_array; it->func; it++) 1211 for (it = (*cb)->items.item_array; it->func; it++)
1211 _special_event_count_dec(pd, it); 1212 _special_event_count_dec(pd, it->desc);
1212 } 1213 }
1213 else _special_event_count_dec(pd, &((*cb)->items.item)); 1214 else _special_event_count_dec(pd, ((*cb)->items.item).desc);
1214#endif 1215#endif
1215 1216
1216 _eo_callback_free(*cb); 1217 _eo_callback_free(*cb);
@@ -1383,33 +1384,24 @@ _efl_object_event_callback_priority_add(Eo *obj, Efl_Object_Data *pd,
1383 Efl_Event_Cb func, 1384 Efl_Event_Cb func,
1384 const void *user_data) 1385 const void *user_data)
1385{ 1386{
1386 const Efl_Callback_Array_Item_Full arr[] = 1387 const Efl_Callback_Array_Item arr = {desc, func};
1387 { {desc, priority, func, (void *)user_data}, {NULL, 0, NULL, NULL}};
1388 Eo_Callback_Description *cb = _eo_callback_new();
1389
1390 // very unlikely so improve l1 instr cache by using goto 1388 // very unlikely so improve l1 instr cache by using goto
1391 if (EINA_UNLIKELY(!cb || !desc || !func)) goto err; 1389 if (EINA_UNLIKELY(!desc || !func)) goto err;
1392 cb->items.item.desc = desc; 1390
1393 cb->items.item.func = func; 1391 eo_event_emitter_register(&pd->emitter, func, desc, priority, user_data);
1394 cb->func_data = (void *)user_data; 1392
1395 cb->priority = priority;
1396 cb->generation = _efl_event_generation(pd);
1397 if (cb->generation) pd->need_cleaning = EINA_TRUE;
1398
1399 _eo_callbacks_sorted_insert(pd, cb);
1400#ifdef EFL_EVENT_SPECIAL_SKIP 1393#ifdef EFL_EVENT_SPECIAL_SKIP
1401 _special_event_count_inc(pd, &(cb->items.item)); 1394 _special_event_count_inc(pd, desc);
1402#endif 1395#endif
1403 if (EINA_UNLIKELY(desc == EFL_EVENT_DESTRUCT)) 1396 if (EINA_UNLIKELY(desc == EFL_EVENT_DESTRUCT))
1404 pd->has_destroyed_event_cb = EINA_TRUE; 1397 pd->has_destroyed_event_cb = EINA_TRUE;
1405 1398
1406 efl_event_callback_call(obj, EFL_EVENT_CALLBACK_ADD, (void *)arr); 1399 efl_event_callback_call(obj, EFL_EVENT_CALLBACK_ADD, (void*)&arr);
1407 1400
1408 return EINA_TRUE; 1401 return EINA_TRUE;
1409 1402
1410err: EINA_COLD 1403err: EINA_COLD
1411 ERR("Tried adding callback with invalid values: cb: %p desc: %p func: %p", cb, desc, func); 1404 ERR("Tried adding callback with invalid values: desc: %p func: %p", desc, func);
1412 _eo_callback_free(cb);
1413 return EINA_FALSE; 1405 return EINA_FALSE;
1414} 1406}
1415 1407
@@ -1439,26 +1431,15 @@ _efl_object_event_callback_del(Eo *obj, Efl_Object_Data *pd,
1439 Efl_Event_Cb func, 1431 Efl_Event_Cb func,
1440 const void *user_data) 1432 const void *user_data)
1441{ 1433{
1442 Eo_Callback_Description **cb; 1434 const Efl_Callback_Array_Item array = {desc, func};
1443 unsigned int i;
1444 1435
1445 for (cb = pd->callbacks, i = 0; 1436 eo_event_emitter_unregister(&pd->emitter, func, desc, user_data);
1446 i < pd->callbacks_count;
1447 cb++, i++)
1448 {
1449 if (!(*cb)->delete_me &&
1450 ((*cb)->items.item.desc == desc) &&
1451 ((*cb)->items.item.func == func) &&
1452 ((*cb)->func_data == user_data))
1453 {
1454 const Efl_Callback_Array_Item_Full arr[] =
1455 { {desc, (*cb)->priority, func, (*cb)->func_data}, {NULL, 0, NULL, NULL}};
1456 1437
1457 _efl_object_event_callback_clean(obj, pd, arr, cb); 1438#ifdef EFL_EVENT_SPECIAL_SKIP
1458 return EINA_TRUE; 1439 _special_event_count_dec(pd, desc);
1459 } 1440#endif
1460 }
1461 1441
1442 efl_event_callback_call(obj, EFL_EVENT_CALLBACK_DEL, (void *)&array);
1462 DBG("Callback of object %p with function %p and data %p not found.", obj, func, user_data); 1443 DBG("Callback of object %p with function %p and data %p not found.", obj, func, user_data);
1463 return EINA_FALSE; 1444 return EINA_FALSE;
1464} 1445}
@@ -1474,61 +1455,33 @@ _efl_object_event_callback_array_priority_add(Eo *obj, Efl_Object_Data *pd,
1474 Efl_Callback_Priority priority, 1455 Efl_Callback_Priority priority,
1475 const void *user_data) 1456 const void *user_data)
1476{ 1457{
1477 Eo_Callback_Description *cb = _eo_callback_new();
1478 const Efl_Callback_Array_Item *it; 1458 const Efl_Callback_Array_Item *it;
1479 unsigned int num, i; 1459 unsigned int num, i;
1480 Efl_Callback_Array_Item_Full *ev_array; 1460 Efl_Callback_Array_Item_Full *ev_array;
1481#ifdef EO_DEBUG
1482 const Efl_Callback_Array_Item *prev;
1483#endif
1484 1461
1485 // very unlikely so improve l1 instr cache by using goto 1462 // very unlikely so improve l1 instr cache by using goto
1486 if (!cb || !array) goto err; 1463 if (!array) goto err;
1487#ifdef EO_DEBUG 1464
1488 prev = array; 1465 num = 0;
1489 for (it = prev + 1; prev->func && it->func; it++, prev++) 1466 for (it = array; it->func; it++)
1490 { 1467 {
1491 if (efl_callbacks_cmp(prev, it) > 0) 1468 num++;
1492 {
1493 ERR("Trying to insert a non sorted array callbacks (%p).", array);
1494 _eo_callback_free(cb);
1495 return EINA_FALSE;
1496 }
1497 }
1498#endif
1499 1469
1500 cb->func_data = (void *) user_data; 1470 eo_event_emitter_register(&pd->emitter, it->func, it->desc, priority, user_data);
1501 cb->priority = priority;
1502 cb->items.item_array = array;
1503 cb->func_array = EINA_TRUE;
1504 cb->generation = _efl_event_generation(pd);
1505 if (!!cb->generation) pd->need_cleaning = EINA_TRUE;
1506 1471
1507 _eo_callbacks_sorted_insert(pd, cb);
1508#ifdef EFL_EVENT_SPECIAL_SKIP 1472#ifdef EFL_EVENT_SPECIAL_SKIP
1509 for (it = cb->items.item_array; it->func; it++) 1473 _special_event_count_inc(pd, it->desc);
1510 _special_event_count_inc(pd, it);
1511#else
1512 if (!pd->has_destroyed_event_cb)
1513 {
1514 for (it = cb->items.item_array; it->func; it++)
1515 if (it->desc == EFL_EVENT_DESTRUCT)
1516 {
1517 pd->has_destroyed_event_cb = EINA_TRUE;
1518 break;
1519 }
1520 }
1521#endif 1474#endif
1522 1475 if (it->desc == EFL_EVENT_DESTRUCT)
1523 num = 0; 1476 pd->has_destroyed_event_cb = EINA_TRUE;
1524 for (it = cb->items.item_array; it->func; it++) num++; 1477 }
1525 ev_array = alloca((num + 1) * sizeof(Efl_Callback_Array_Item_Full)); 1478 ev_array = alloca((num + 1) * sizeof(Efl_Callback_Array_Item_Full));
1526 for (i = 0, it = cb->items.item_array; it->func; it++, i++) 1479 for (i = 0, it = array; it->func; it++, i++)
1527 { 1480 {
1528 ev_array[i].desc = cb->items.item_array[i].desc; 1481 ev_array[i].desc = array[i].desc;
1529 ev_array[i].priority = cb->priority; 1482 ev_array[i].priority = priority;
1530 ev_array[i].func = cb->items.item_array[i].func; 1483 ev_array[i].func = array[i].func;
1531 ev_array[i].user_data = cb->func_data; 1484 ev_array[i].user_data = (void*)user_data;
1532 } 1485 }
1533 ev_array[i].desc = NULL; 1486 ev_array[i].desc = NULL;
1534 ev_array[i].priority = 0; 1487 ev_array[i].priority = 0;
@@ -1539,8 +1492,7 @@ _efl_object_event_callback_array_priority_add(Eo *obj, Efl_Object_Data *pd,
1539 return EINA_TRUE; 1492 return EINA_TRUE;
1540 1493
1541err: 1494err:
1542 ERR("Tried adding array of callbacks with invalid values: cb: %p array: %p.", cb, array); 1495 ERR("Tried adding array of callbacks with invalid values: array: %p.", array);
1543 _eo_callback_free(cb);
1544 return EINA_FALSE; 1496 return EINA_FALSE;
1545} 1497}
1546 1498
@@ -1554,38 +1506,11 @@ _efl_object_event_callback_array_del(Eo *obj, Efl_Object_Data *pd,
1554 const Efl_Callback_Array_Item *array, 1506 const Efl_Callback_Array_Item *array,
1555 const void *user_data) 1507 const void *user_data)
1556{ 1508{
1557 Eo_Callback_Description **cb; 1509 const Efl_Callback_Array_Item *it;
1558 unsigned int j;
1559 1510
1560 for (cb = pd->callbacks, j = 0; 1511 for (it = array; it->func; it++)
1561 j < pd->callbacks_count;
1562 cb++, j++)
1563 { 1512 {
1564 if (!(*cb)->delete_me && 1513 eo_event_emitter_unregister(&pd->emitter, it->func, it->desc, user_data);
1565 ((*cb)->items.item_array == array) &&
1566 ((*cb)->func_data == user_data))
1567 {
1568 const Efl_Callback_Array_Item *it;
1569 unsigned int num, i;
1570 Efl_Callback_Array_Item_Full *ev_array;
1571
1572 num = 0;
1573 for (it = (*cb)->items.item_array; it->func; it++) num++;
1574 ev_array = alloca((num + 1) * sizeof(Efl_Callback_Array_Item_Full));
1575 for (i = 0, it = (*cb)->items.item_array; it->func; it++, i++)
1576 {
1577 ev_array[i].desc = (*cb)->items.item_array[i].desc;
1578 ev_array[i].priority = (*cb)->priority;
1579 ev_array[i].func = (*cb)->items.item_array[i].func;
1580 ev_array[i].user_data = (*cb)->func_data;
1581 }
1582 ev_array[i].desc = NULL;
1583 ev_array[i].priority = 0;
1584 ev_array[i].func = NULL;
1585 ev_array[i].user_data = NULL;
1586 _efl_object_event_callback_clean(obj, pd, ev_array, cb);
1587 return EINA_TRUE;
1588 }
1589 } 1514 }
1590 1515
1591 DBG("Callback of object %p with function array %p and data %p not found.", obj, array, user_data); 1516 DBG("Callback of object %p with function array %p and data %p not found.", obj, array, user_data);
@@ -1766,7 +1691,8 @@ _efl_object_event_callback_call(Eo *obj_id, Efl_Object_Data *pd,
1766 const Efl_Event_Description *desc, 1691 const Efl_Event_Description *desc,
1767 void *event_info) 1692 void *event_info)
1768{ 1693{
1769 return _event_callback_call(obj_id, pd, desc, event_info, EINA_FALSE); 1694 Efl_Event ev = { obj_id, desc, event_info };
1695 return eo_event_emitter_emit(&pd->emitter, &ev, EINA_FALSE);
1770} 1696}
1771 1697
1772EOAPI EFL_FUNC_BODYV(efl_event_callback_call, 1698EOAPI EFL_FUNC_BODYV(efl_event_callback_call,
@@ -1778,7 +1704,8 @@ _efl_object_event_callback_legacy_call(Eo *obj_id, Efl_Object_Data *pd,
1778 const Efl_Event_Description *desc, 1704 const Efl_Event_Description *desc,
1779 void *event_info) 1705 void *event_info)
1780{ 1706{
1781 return _event_callback_call(obj_id, pd, desc, event_info, EINA_TRUE); 1707 Efl_Event ev = { obj_id, desc, event_info };
1708 return eo_event_emitter_emit(&pd->emitter, &ev, EINA_TRUE);
1782} 1709}
1783 1710
1784EOAPI EFL_FUNC_BODYV(efl_event_callback_legacy_call, 1711EOAPI EFL_FUNC_BODYV(efl_event_callback_legacy_call,
@@ -1788,7 +1715,7 @@ EOAPI EFL_FUNC_BODYV(efl_event_callback_legacy_call,
1788EOLIAN static void 1715EOLIAN static void
1789_efl_object_event_callback_stop(Eo *obj EINA_UNUSED, Efl_Object_Data *pd) 1716_efl_object_event_callback_stop(Eo *obj EINA_UNUSED, Efl_Object_Data *pd)
1790{ 1717{
1791 pd->callback_stopped = EINA_TRUE; 1718 eo_event_emitter_stop(&pd->emitter);
1792} 1719}
1793 1720
1794static void 1721static void
@@ -2156,10 +2083,12 @@ efl_future_chain_array(Eo *obj,
2156} 2083}
2157 2084
2158EOLIAN static Eo * 2085EOLIAN static Eo *
2159_efl_object_constructor(Eo *obj, Efl_Object_Data *pd EINA_UNUSED) 2086_efl_object_constructor(Eo *obj, Efl_Object_Data *pd)
2160{ 2087{
2161 DBG("%p - %s.", obj, efl_class_name_get(obj)); 2088 DBG("%p - %s.", obj, efl_class_name_get(obj));
2162 2089
2090 eo_event_emitter_init(&pd->emitter);
2091
2163 _eo_condtor_done(obj); 2092 _eo_condtor_done(obj);
2164 2093
2165 return obj; 2094 return obj;
@@ -2207,7 +2136,10 @@ err_parent_back:
2207 // point (so efl_destructed_is() returns false), but triggering the 2136 // point (so efl_destructed_is() returns false), but triggering the
2208 // "destruct" event here is the simplest, safest solution. 2137 // "destruct" event here is the simplest, safest solution.
2209 if (EINA_UNLIKELY(pd->has_destroyed_event_cb)) 2138 if (EINA_UNLIKELY(pd->has_destroyed_event_cb))
2210 _event_callback_call(obj, pd, EFL_EVENT_DESTRUCT, NULL, EINA_FALSE); 2139 {
2140 Efl_Event ev = {obj, EFL_EVENT_DESTRUCT, NULL};
2141 eo_event_emitter_emit(&pd->emitter, &ev, EINA_FALSE);
2142 }
2211 2143
2212 // remove generic data after this final event, in case they are used in a cb 2144 // remove generic data after this final event, in case they are used in a cb
2213 _eo_generic_data_del_all(obj, pd); 2145 _eo_generic_data_del_all(obj, pd);
@@ -2338,3 +2270,4 @@ _efl_object_class_destructor(Efl_Class *klass EINA_UNUSED)
2338 EFL_OBJECT_OP_FUNC(efl_key_value_get, _efl_object_key_value_get) \ 2270 EFL_OBJECT_OP_FUNC(efl_key_value_get, _efl_object_key_value_get) \
2339 2271
2340#include "efl_object.eo.c" 2272#include "efl_object.eo.c"
2273
diff --git a/src/tests/eo/suite/eo_test_event.c b/src/tests/eo/suite/eo_test_event.c
index 2750616508..bf4b7828ba 100644
--- a/src/tests/eo/suite/eo_test_event.c
+++ b/src/tests/eo/suite/eo_test_event.c
@@ -205,7 +205,7 @@ _nop(void *data, const Efl_Event *info)
205static void 205static void
206_delete_in_ev(void *data, const Efl_Event *info) 206_delete_in_ev(void *data, const Efl_Event *info)
207{ 207{
208 eo_event_emitter_unregister(data, _nop, EFL_EVENT_DEL, 0, NULL); 208 eo_event_emitter_unregister(data, _nop, EFL_EVENT_DEL, NULL);
209} 209}
210 210
211EFL_START_TEST(eo_event_basic) 211EFL_START_TEST(eo_event_basic)
@@ -216,13 +216,13 @@ EFL_START_TEST(eo_event_basic)
216 216
217 eo_event_emitter_init(&emitter); 217 eo_event_emitter_init(&emitter);
218 eo_event_emitter_register(&emitter, _test, EFL_EVENT_DEL, 0, &flag); 218 eo_event_emitter_register(&emitter, _test, EFL_EVENT_DEL, 0, &flag);
219 eo_event_emitter_emit(&emitter, &ev); 219 eo_event_emitter_emit(&emitter, &ev, EINA_TRUE);
220 220
221 ck_assert_int_eq(flag, EINA_TRUE); 221 ck_assert_int_eq(flag, EINA_TRUE);
222 flag = EINA_FALSE; 222 flag = EINA_FALSE;
223 223
224 eo_event_emitter_unregister(&emitter, _test, EFL_EVENT_DEL, 0, &flag); 224 eo_event_emitter_unregister(&emitter, _test, EFL_EVENT_DEL, &flag);
225 eo_event_emitter_emit(&emitter, &ev); 225 eo_event_emitter_emit(&emitter, &ev, EINA_TRUE);
226 226
227 ck_assert_int_eq(flag, EINA_FALSE); 227 ck_assert_int_eq(flag, EINA_FALSE);
228} 228}
@@ -237,7 +237,7 @@ EFL_START_TEST(eo_event_basic_del)
237 eo_event_emitter_register(&emitter, _nop, EFL_EVENT_DEL, 0, NULL); 237 eo_event_emitter_register(&emitter, _nop, EFL_EVENT_DEL, 0, NULL);
238 eo_event_emitter_register(&emitter, _delete_in_ev, EFL_EVENT_DEL, 0, &emitter); 238 eo_event_emitter_register(&emitter, _delete_in_ev, EFL_EVENT_DEL, 0, &emitter);
239 eo_event_emitter_register(&emitter, _nop, EFL_EVENT_DEL, 0, NULL); 239 eo_event_emitter_register(&emitter, _nop, EFL_EVENT_DEL, 0, NULL);
240 eo_event_emitter_emit(&emitter, &ev); 240 eo_event_emitter_emit(&emitter, &ev, EINA_TRUE);
241} 241}
242EFL_END_TEST 242EFL_END_TEST
243 243
@@ -274,7 +274,7 @@ EFL_START_TEST(eo_event_basic_order)
274 274
275 counter = 0; 275 counter = 0;
276 276
277 eo_event_emitter_emit(&emitter, &ev); 277 eo_event_emitter_emit(&emitter, &ev, EINA_TRUE);
278 278
279 for (int i = 0; i < 9; ++i) 279 for (int i = 0; i < 9; ++i)
280 { 280 {
@@ -285,9 +285,9 @@ EFL_END_TEST
285 285
286void eo_test_event(TCase *tc) 286void eo_test_event(TCase *tc)
287{ 287{
288 //tcase_add_test(tc, eo_event); 288 tcase_add_test(tc, eo_event);
289 //tcase_add_test(tc, eo_event_call_in_call); 289 tcase_add_test(tc, eo_event_call_in_call);
290 //tcase_add_test(tc, eo_event_generation_bug); 290 tcase_add_test(tc, eo_event_generation_bug);
291 tcase_add_test(tc, eo_event_basic); 291 tcase_add_test(tc, eo_event_basic);
292 tcase_add_test(tc, eo_event_basic_order); 292 tcase_add_test(tc, eo_event_basic_order);
293} 293}
diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c
index 603b14e836..7952d4db0b 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -182,9 +182,9 @@ _eo_signals_cb_added_deled(void *data EINA_UNUSED, const Efl_Event *event)
182 const Efl_Callback_Array_Item_Full *callback_array = event->info; 182 const Efl_Callback_Array_Item_Full *callback_array = event->info;
183 183
184 if (check_is_deled) 184 if (check_is_deled)
185 fail_if(callback_array->func == _eo_signals_cb_added_deled); 185 ck_assert_ptr_eq(callback_array->func, _eo_signals_cb_added_deled);
186 else 186 else
187 fail_if(callback_array->func != _eo_signals_cb_added_deled); 187 ck_assert_ptr_ne(callback_array->func, _eo_signals_cb_added_deled);
188} 188}
189 189
190EFL_CALLBACKS_ARRAY_DEFINE(_eo_signals_callbacks, 190EFL_CALLBACKS_ARRAY_DEFINE(_eo_signals_callbacks,