summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean@guyomarch.bzh>2018-01-09 07:49:39 +0100
committerJean Guyomarc'h <jean@guyomarch.bzh>2018-01-09 07:49:39 +0100
commit3864b10e50fd531531f437c44db504747250f507 (patch)
tree2c58e5e08fb155c7629db0ee607feb3d4b718ca5
parent2a32379878ff9e7bc42dcb024777cc9343a03b7c (diff)
Revert "experimental: remove the EO ptr indirection"
This reverts commit 97688b2fa5497790f532f425062844ad0c7949ea.
-rw-r--r--src/lib/eo/Eo.h16
-rw-r--r--src/lib/eo/eo.c100
-rw-r--r--src/lib/eo/eo_base_class.c21
-rw-r--r--src/lib/eo/eo_private.h20
-rw-r--r--src/lib/eo/eo_ptr_indirection.c2
-rw-r--r--src/lib/eo/eo_ptr_indirection.h9
-rw-r--r--src/lib/eo/eo_ptr_indirection.x7
7 files changed, 12 insertions, 163 deletions
diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 96f4e2082d..1c036f7252 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -8,12 +8,10 @@
8# undef EAPI 8# undef EAPI
9#endif 9#endif
10 10
11#define EO_NO_PTR_INDIRECTION
12 11
13#define EINA_COLD __attribute__ ((cold)); 12#define EINA_COLD __attribute__ ((cold));
14#define EINA_HOT __attribute__ ((hot)); 13#define EINA_HOT __attribute__ ((hot));
15 14
16
17#define EOLIAN 15#define EOLIAN
18 16
19/* When used, this indicates that the function is an Eo API. */ 17/* When used, this indicates that the function is an Eo API. */
@@ -1247,12 +1245,6 @@ __##Name##_failed: EINA_COLD\
1247#define _EFL_OBJECT_API_AFTER_HOOK 1245#define _EFL_OBJECT_API_AFTER_HOOK
1248#define _EFL_OBJECT_API_CALL_HOOK(x) x 1246#define _EFL_OBJECT_API_CALL_HOOK(x) x
1249 1247
1250#ifdef EO_NO_PTR_INDIRECTION
1251# define _EO_CALL_OBJ() (Eo*)___call.obj
1252#else
1253# define _EO_CALL_OBJ() ___call.eo_id
1254#endif
1255
1256// to define an EAPI function 1248// to define an EAPI function
1257#define _EFL_OBJECT_FUNC_BODY(Name, ObjType, Ret, DefRet, ErrorCase) \ 1249#define _EFL_OBJECT_FUNC_BODY(Name, ObjType, Ret, DefRet, ErrorCase) \
1258 Ret \ 1250 Ret \
@@ -1262,7 +1254,7 @@ __##Name##_failed: EINA_COLD\
1262 Ret _r; \ 1254 Ret _r; \
1263 EFL_FUNC_COMMON_OP(obj, Name, DefRet); \ 1255 EFL_FUNC_COMMON_OP(obj, Name, DefRet); \
1264 _EFL_OBJECT_API_BEFORE_HOOK \ 1256 _EFL_OBJECT_API_BEFORE_HOOK \
1265 _r = _EFL_OBJECT_API_CALL_HOOK(_func_(_EO_CALL_OBJ(), ___call.data)); \ 1257 _r = _EFL_OBJECT_API_CALL_HOOK(_func_(___call.eo_id, ___call.data)); \
1266 _efl_object_call_end(&___call); \ 1258 _efl_object_call_end(&___call); \
1267 _EFL_OBJECT_API_AFTER_HOOK \ 1259 _EFL_OBJECT_API_AFTER_HOOK \
1268 return _r; \ 1260 return _r; \
@@ -1276,7 +1268,7 @@ __##Name##_failed: EINA_COLD\
1276 typedef void (*_Eo_##Name##_func)(Eo *, void *obj_data); \ 1268 typedef void (*_Eo_##Name##_func)(Eo *, void *obj_data); \
1277 EFL_FUNC_COMMON_OP(obj, Name, ); \ 1269 EFL_FUNC_COMMON_OP(obj, Name, ); \
1278 _EFL_OBJECT_API_BEFORE_HOOK \ 1270 _EFL_OBJECT_API_BEFORE_HOOK \
1279 _EFL_OBJECT_API_CALL_HOOK(_func_(_EO_CALL_OBJ(), ___call.data)); \ 1271 _EFL_OBJECT_API_CALL_HOOK(_func_(___call.eo_id, ___call.data)); \
1280 _efl_object_call_end(&___call); \ 1272 _efl_object_call_end(&___call); \
1281 _EFL_OBJECT_API_AFTER_HOOK \ 1273 _EFL_OBJECT_API_AFTER_HOOK \
1282 return; \ 1274 return; \
@@ -1291,7 +1283,7 @@ __##Name##_failed: EINA_COLD\
1291 Ret _r; \ 1283 Ret _r; \
1292 EFL_FUNC_COMMON_OP(obj, Name, DefRet); \ 1284 EFL_FUNC_COMMON_OP(obj, Name, DefRet); \
1293 _EFL_OBJECT_API_BEFORE_HOOK \ 1285 _EFL_OBJECT_API_BEFORE_HOOK \
1294 _r = _EFL_OBJECT_API_CALL_HOOK(_func_(_EO_CALL_OBJ(), ___call.data, Arguments)); \ 1286 _r = _EFL_OBJECT_API_CALL_HOOK(_func_(___call.eo_id, ___call.data, Arguments)); \
1295 _efl_object_call_end(&___call); \ 1287 _efl_object_call_end(&___call); \
1296 _EFL_OBJECT_API_AFTER_HOOK \ 1288 _EFL_OBJECT_API_AFTER_HOOK \
1297 return _r; \ 1289 return _r; \
@@ -1305,7 +1297,7 @@ __##Name##_failed: EINA_COLD\
1305 typedef void (*_Eo_##Name##_func)(Eo *, void *obj_data, __VA_ARGS__); \ 1297 typedef void (*_Eo_##Name##_func)(Eo *, void *obj_data, __VA_ARGS__); \
1306 EFL_FUNC_COMMON_OP(obj, Name, ); \ 1298 EFL_FUNC_COMMON_OP(obj, Name, ); \
1307 _EFL_OBJECT_API_BEFORE_HOOK \ 1299 _EFL_OBJECT_API_BEFORE_HOOK \
1308 _EFL_OBJECT_API_CALL_HOOK(_func_(_EO_CALL_OBJ(), ___call.data, Arguments)); \ 1300 _EFL_OBJECT_API_CALL_HOOK(_func_(___call.eo_id, ___call.data, Arguments)); \
1309 _efl_object_call_end(&___call); \ 1301 _efl_object_call_end(&___call); \
1310 _EFL_OBJECT_API_AFTER_HOOK \ 1302 _EFL_OBJECT_API_AFTER_HOOK \
1311 return; \ 1303 return; \
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 4b97207e15..ed54056872 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -2,8 +2,6 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#include <signal.h>
6
7#if defined HAVE_DLADDR && ! defined _WIN32 5#if defined HAVE_DLADDR && ! defined _WIN32
8# include <dlfcn.h> 6# include <dlfcn.h>
9#endif 7#endif
@@ -305,11 +303,7 @@ _vtable_func_clean_all(Eo_Vtable *vtable)
305 303
306/* END OF DICH */ 304/* END OF DICH */
307 305
308#ifdef EO_NO_PTR_INDIRECTION 306#define _EO_ID_GET(Id) ((Eo_Id) (Id))
309# define _EO_ID_GET(Id) (((const Eo_Header *) (Id))->id)
310#else
311# define _EO_ID_GET(Id) ((Eo_Id) (Id))
312#endif
313 307
314 308
315static inline Eina_Bool 309static inline Eina_Bool
@@ -329,11 +323,7 @@ _eo_is_a_class(const Eo *eo_id)
329static inline _Efl_Class * 323static inline _Efl_Class *
330_eo_class_pointer_get(const Efl_Class *klass_id) 324_eo_class_pointer_get(const Efl_Class *klass_id)
331{ 325{
332#ifdef EO_NO_PTR_INDIRECTION
333 return (_Efl_Class *)klass_id;
334#else
335 return ID_CLASS_GET((Eo_Id)klass_id); 326 return ID_CLASS_GET((Eo_Id)klass_id);
336#endif
337} 327}
338 328
339static const char * 329static const char *
@@ -462,11 +452,7 @@ _efl_object_call_resolve(Eo *eo_id, const char *func_name, Efl_Object_Op_Call_Da
462 452
463 if (EINA_UNLIKELY(!eo_id)) return EINA_FALSE; 453 if (EINA_UNLIKELY(!eo_id)) return EINA_FALSE;
464 454
465#ifdef EO_NO_PTR_INDIRECTION
466 call->eo_id = _eo_obj_id_get((const _Eo_Object*)eo_id);
467#else
468 call->eo_id = eo_id; 455 call->eo_id = eo_id;
469#endif
470 456
471 is_obj = _eo_is_a_obj(eo_id); 457 is_obj = _eo_is_a_obj(eo_id);
472 458
@@ -636,7 +622,7 @@ err: EINA_COLD
636 efl_unref(eo_id); 622 efl_unref(eo_id);
637 } 623 }
638 _efl_unref(obj); 624 _efl_unref(obj);
639 EO_OBJ_DONE(eo_id); 625 _eo_obj_pointer_done((Eo_Id)eo_id);
640 } 626 }
641 return EINA_FALSE; 627 return EINA_FALSE;
642 628
@@ -692,10 +678,10 @@ _efl_object_call_end(Efl_Object_Op_Call_Data *call)
692 if (EINA_UNLIKELY(call->obj->auto_unref != 0)) 678 if (EINA_UNLIKELY(call->obj->auto_unref != 0))
693 { 679 {
694 if (call->obj->finalized && !(--call->obj->auto_unref)) 680 if (call->obj->finalized && !(--call->obj->auto_unref))
695 efl_unref((Eo*)(call->obj)); 681 efl_unref(call->eo_id);
696 } 682 }
697 _efl_unref(call->obj); 683 _efl_unref(call->obj);
698 EO_OBJ_DONE(call->obj); 684 _eo_obj_pointer_done((Eo_Id)call->eo_id);
699 } 685 }
700} 686}
701 687
@@ -906,9 +892,7 @@ err_klass:
906EAPI Eo * 892EAPI Eo *
907_efl_add_internal_start(const char *file, int line, const Efl_Class *klass_id, Eo *parent_id, Eina_Bool ref EINA_UNUSED, Eina_Bool is_fallback) 893_efl_add_internal_start(const char *file, int line, const Efl_Class *klass_id, Eo *parent_id, Eina_Bool ref EINA_UNUSED, Eina_Bool is_fallback)
908{ 894{
909#ifndef EO_NO_PTR_INDIRECTION
910 const char *func_name = __FUNCTION__; 895 const char *func_name = __FUNCTION__;
911#endif
912 _Eo_Object *obj; 896 _Eo_Object *obj;
913 Eo_Stack_Frame *fptr = NULL; 897 Eo_Stack_Frame *fptr = NULL;
914 898
@@ -943,11 +927,7 @@ _efl_add_internal_start(const char *file, int line, const Efl_Class *klass_id, E
943 obj->klass = klass; 927 obj->klass = klass;
944 928
945 obj->header.id = _eo_id_allocate(obj, parent_id); 929 obj->header.id = _eo_id_allocate(obj, parent_id);
946#ifdef EO_NO_PTR_INDIRECTION
947 Eo *eo_id = (Eo *)obj;
948#else
949 Eo *eo_id = _eo_obj_id_get(obj); 930 Eo *eo_id = _eo_obj_id_get(obj);
950#endif
951 931
952 _eo_log_obj_ref_op(obj, EO_REF_OP_NEW); 932 _eo_log_obj_ref_op(obj, EO_REF_OP_NEW);
953 933
@@ -963,11 +943,7 @@ _efl_add_internal_start(const char *file, int line, const Efl_Class *klass_id, E
963 // not likely so use goto to alleviate l1 instruction cache of rare code 943 // not likely so use goto to alleviate l1 instruction cache of rare code
964 if (!eo_id) goto err_noid; 944 if (!eo_id) goto err_noid;
965 // not likely so use goto to alleviate l1 instruction cache of rare code 945 // not likely so use goto to alleviate l1 instruction cache of rare code
966#ifdef EO_NO_PTR_INDIRECTION
967 else if (eo_id != (Eo*)obj) goto ok_nomatch;
968#else
969 else if (eo_id != _eo_obj_id_get(obj)) goto ok_nomatch; 946 else if (eo_id != _eo_obj_id_get(obj)) goto ok_nomatch;
970#endif
971ok_nomatch_back: 947ok_nomatch_back:
972 if (is_fallback) fptr->obj = eo_id; 948 if (is_fallback) fptr->obj = eo_id;
973 if (parent_id) EO_OBJ_DONE(parent_id); 949 if (parent_id) EO_OBJ_DONE(parent_id);
@@ -978,11 +954,7 @@ ok_nomatch:
978 EO_OBJ_POINTER_GOTO_PROXY(eo_id, new_obj, err_newid); 954 EO_OBJ_POINTER_GOTO_PROXY(eo_id, new_obj, err_newid);
979 /* We have two refs at this point. */ 955 /* We have two refs at this point. */
980 _efl_unref(obj); 956 _efl_unref(obj);
981#ifdef EO_NO_PTR_INDIRECTION
982 efl_del((Eo*)obj);
983#else
984 efl_del((Eo *)obj->header.id); 957 efl_del((Eo *)obj->header.id);
985#endif
986 _efl_ref(new_obj); 958 _efl_ref(new_obj);
987 EO_OBJ_DONE(eo_id); 959 EO_OBJ_DONE(eo_id);
988 } 960 }
@@ -993,11 +965,7 @@ err_noid:
993 file, line, klass->desc->name); 965 file, line, klass->desc->name);
994 /* We have two refs at this point. */ 966 /* We have two refs at this point. */
995 _efl_unref(obj); 967 _efl_unref(obj);
996#ifdef EO_NO_PTR_INDIRECTION
997 efl_del((Eo*)obj);
998#else
999 efl_del((Eo *) obj->header.id); 968 efl_del((Eo *) obj->header.id);
1000#endif
1001err_newid: 969err_newid:
1002 if (parent_id) EO_OBJ_DONE(parent_id); 970 if (parent_id) EO_OBJ_DONE(parent_id);
1003 return NULL; 971 return NULL;
@@ -1048,11 +1016,7 @@ err_condtor:
1048 } 1016 }
1049cleanup: 1017cleanup:
1050 _efl_unref(obj); 1018 _efl_unref(obj);
1051#ifdef EO_NO_PTR_INDIRECTION
1052 efl_del((Eo*)obj);
1053#else
1054 efl_del((Eo *) obj->header.id); 1019 efl_del((Eo *) obj->header.id);
1055#endif
1056 EO_OBJ_DONE(eo_id); 1020 EO_OBJ_DONE(eo_id);
1057 return NULL; 1021 return NULL;
1058} 1022}
@@ -1178,11 +1142,7 @@ efl_class_get(const Eo *eo_id)
1178 } 1142 }
1179 1143
1180 EO_OBJ_POINTER_GOTO(eo_id, obj, err_obj); 1144 EO_OBJ_POINTER_GOTO(eo_id, obj, err_obj);
1181#ifdef EO_NO_PTR_INDIRECTION
1182 klass = (const Efl_Class *)obj->klass;
1183#else
1184 klass = _eo_class_id_get(obj->klass); 1145 klass = _eo_class_id_get(obj->klass);
1185#endif
1186 EO_OBJ_DONE(eo_id); 1146 EO_OBJ_DONE(eo_id);
1187 return klass; 1147 return klass;
1188 1148
@@ -1354,11 +1314,7 @@ static Eina_Bool
1354_eo_class_initializer(_Efl_Class *klass) 1314_eo_class_initializer(_Efl_Class *klass)
1355{ 1315{
1356 if (klass->desc->class_initializer) 1316 if (klass->desc->class_initializer)
1357#ifdef EO_NO_PTR_INDIRECTION
1358 return klass->desc->class_initializer((Efl_Class *)klass);
1359#else
1360 return klass->desc->class_initializer(_eo_class_id_get(klass)); 1317 return klass->desc->class_initializer(_eo_class_id_get(klass));
1361#endif
1362 1318
1363 return EINA_TRUE; 1319 return EINA_TRUE;
1364} 1320}
@@ -1369,11 +1325,7 @@ _eo_class_constructor(_Efl_Class *klass)
1369 klass->constructed = EINA_TRUE; 1325 klass->constructed = EINA_TRUE;
1370 1326
1371 if (klass->desc->class_constructor) 1327 if (klass->desc->class_constructor)
1372#ifdef EO_NO_PTR_INDIRECTION
1373 klass->desc->class_constructor((Efl_Class *)klass);
1374#else
1375 klass->desc->class_constructor(_eo_class_id_get(klass)); 1328 klass->desc->class_constructor(_eo_class_id_get(klass));
1376#endif
1377} 1329}
1378 1330
1379static void 1331static void
@@ -1703,11 +1655,7 @@ efl_class_new(const Efl_Class_Description *desc, const Efl_Class *parent_id, ...
1703 /* If functions haven't been set, invoke it with an empty ops structure. */ 1655 /* If functions haven't been set, invoke it with an empty ops structure. */
1704 if (!klass->functions_set) 1656 if (!klass->functions_set)
1705 { 1657 {
1706#ifdef EO_NO_PTR_INDIRECTION
1707 efl_class_functions_set((const Efl_Class*)klass, NULL, NULL);
1708#else
1709 efl_class_functions_set(_eo_class_id_get(klass), NULL, NULL); 1658 efl_class_functions_set(_eo_class_id_get(klass), NULL, NULL);
1710#endif
1711 } 1659 }
1712 1660
1713 /* Mark which classes we implement */ 1661 /* Mark which classes we implement */
@@ -1720,11 +1668,7 @@ efl_class_new(const Efl_Class_Description *desc, const Efl_Class *parent_id, ...
1720 1668
1721 DBG("Finished building class '%s'", klass->desc->name); 1669 DBG("Finished building class '%s'", klass->desc->name);
1722 1670
1723#ifdef EO_NO_PTR_INDIRECTION
1724 return (const Efl_Class*) klass;
1725#else
1726 return _eo_class_id_get(klass); 1671 return _eo_class_id_get(klass);
1727#endif
1728} 1672}
1729 1673
1730EAPI Eina_Bool 1674EAPI Eina_Bool
@@ -1777,21 +1721,6 @@ err:
1777EAPI Eina_Bool 1721EAPI Eina_Bool
1778efl_isa(const Eo *eo_id, const Efl_Class *klass_id) 1722efl_isa(const Eo *eo_id, const Efl_Class *klass_id)
1779{ 1723{
1780#ifdef EO_NO_PTR_INDIRECTION
1781 if (EINA_UNLIKELY(!eo_id)) return EINA_FALSE;
1782
1783 EO_OBJ_POINTER_GOTO(eo_id, obj, fail);
1784 EO_CLASS_POINTER_GOTO(klass_id, klass, fail);
1785
1786 const op_type_funcs *func = _vtable_func_get
1787 (EO_VTABLE(obj), klass->base_id + klass->ops_count);
1788
1789 return (func && (func->func == _eo_class_isa_func));
1790fail:
1791 raise(SIGABRT);
1792 return EINA_FALSE;
1793
1794#else
1795 Efl_Id_Domain domain; 1724 Efl_Id_Domain domain;
1796 Eo_Id_Data *data; 1725 Eo_Id_Data *data;
1797 Eo_Id_Table_Data *tdata; 1726 Eo_Id_Table_Data *tdata;
@@ -1877,7 +1806,6 @@ err: EINA_COLD
1877 (data->tables[0]) ? "0" : " ", (data->tables[1]) ? "1" : " ", 1806 (data->tables[0]) ? "0" : " ", (data->tables[1]) ? "1" : " ",
1878 (data->tables[2]) ? "2" : " ", (data->tables[3]) ? "3" : " "); 1807 (data->tables[2]) ? "2" : " ", (data->tables[3]) ? "3" : " ");
1879 return EINA_FALSE; 1808 return EINA_FALSE;
1880#endif
1881} 1809}
1882 1810
1883EAPI Eo * 1811EAPI Eo *
@@ -1886,9 +1814,7 @@ efl_xref_internal(const char *file, int line, Eo *obj_id, const Eo *ref_obj_id)
1886 efl_ref(obj_id); 1814 efl_ref(obj_id);
1887 1815
1888#ifdef EO_DEBUG 1816#ifdef EO_DEBUG
1889# ifndef EO_NO_PTR_INDIRECTION
1890 const char *func_name = __FUNCTION__; 1817 const char *func_name = __FUNCTION__;
1891# endif
1892 EO_OBJ_POINTER_RETURN_VAL_PROXY(obj_id, obj, obj_id); 1818 EO_OBJ_POINTER_RETURN_VAL_PROXY(obj_id, obj, obj_id);
1893 1819
1894 Eo_Xref_Node *xref = calloc(1, sizeof(*xref)); 1820 Eo_Xref_Node *xref = calloc(1, sizeof(*xref));
@@ -2202,9 +2128,7 @@ efl_data_xref_internal(const char *file, int line, const Eo *obj_id, const Efl_C
2202{ 2128{
2203 void *ret = NULL; 2129 void *ret = NULL;
2204 _Efl_Class *klass = NULL; 2130 _Efl_Class *klass = NULL;
2205#ifndef EO_NO_PTR_INDIRECTION
2206 const char *func_name = __FUNCTION__; 2131 const char *func_name = __FUNCTION__;
2207#endif
2208 EO_OBJ_POINTER_RETURN_VAL_PROXY(obj_id, obj, NULL); 2132 EO_OBJ_POINTER_RETURN_VAL_PROXY(obj_id, obj, NULL);
2209 EO_OBJ_POINTER_PROXY(ref_obj_id, ref_obj); 2133 EO_OBJ_POINTER_PROXY(ref_obj_id, ref_obj);
2210 if (ref_obj) 2134 if (ref_obj)
@@ -2567,19 +2491,12 @@ efl_domain_data_return(Efl_Id_Domain domain)
2567EAPI Eina_Bool 2491EAPI Eina_Bool
2568efl_compatible(const Eo *obj, const Eo *obj_target) 2492efl_compatible(const Eo *obj, const Eo *obj_target)
2569{ 2493{
2570#ifdef EO_NO_PTR_INDIRECTION
2571 CRI("UNSUPPORTED");
2572 (void) obj;
2573 (void) obj_target;
2574 return EINA_FALSE;
2575#else
2576 Efl_Id_Domain domain1 = ((Eo_Id)obj >> SHIFT_DOMAIN) & MASK_DOMAIN; 2494 Efl_Id_Domain domain1 = ((Eo_Id)obj >> SHIFT_DOMAIN) & MASK_DOMAIN;
2577 Efl_Id_Domain domain2 = ((Eo_Id)obj_target >> SHIFT_DOMAIN) & MASK_DOMAIN; 2495 Efl_Id_Domain domain2 = ((Eo_Id)obj_target >> SHIFT_DOMAIN) & MASK_DOMAIN;
2578 if (domain1 == domain2) return EINA_TRUE; 2496 if (domain1 == domain2) return EINA_TRUE;
2579 DBG("Object %p and %p are not compatible. Domain %i and %i do not match", 2497 DBG("Object %p and %p are not compatible. Domain %i and %i do not match",
2580 obj, obj_target, domain1, domain2); 2498 obj, obj_target, domain1, domain2);
2581 return EINA_FALSE; 2499 return EINA_FALSE;
2582#endif
2583} 2500}
2584 2501
2585EAPI Eina_Bool 2502EAPI Eina_Bool
@@ -2672,15 +2589,10 @@ efl_debug_name_get(const Eo *obj_id)
2672 } 2589 }
2673 else 2590 else
2674 { 2591 {
2675#ifdef EO_NO_PTR_INDIRECTION
2676 Efl_Class *klass_obj = (Efl_Class*)obj->cur_klass;
2677#else
2678 Efl_Class *klass_obj = (Efl_Class *) obj->cur_klass->header.id;
2679#endif
2680 if (obj->super) 2592 if (obj->super)
2681 efl_debug_name_override(efl_super(obj_id, klass_obj), sb); 2593 efl_debug_name_override(efl_super(obj_id, (Efl_Class *) obj->cur_klass->header.id), sb);
2682 else 2594 else
2683 efl_debug_name_override(efl_cast(obj_id, klass_obj), sb); 2595 efl_debug_name_override(efl_cast(obj_id, (Efl_Class *) obj->cur_klass->header.id), sb);
2684 obj->super = EINA_FALSE; 2596 obj->super = EINA_FALSE;
2685 obj->cur_klass = NULL; 2597 obj->cur_klass = NULL;
2686 } 2598 }
diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 99d55203a1..13c8bc229f 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -513,11 +513,7 @@ _efl_object_name_find(const Eo *obj EINA_UNUSED, Efl_Object_Data *pd, const char
513 name_glob = _hasglob(search_name); 513 name_glob = _hasglob(search_name);
514 EINA_INLIST_FOREACH(pd->children, child_eo) 514 EINA_INLIST_FOREACH(pd->children, child_eo)
515 { 515 {
516#ifdef EO_NO_PTR_INDIRECTION
517 child = (Eo*)child_eo;
518#else
519 child = _eo_obj_id_get(child_eo); 516 child = _eo_obj_id_get(child_eo);
520#endif
521 name = efl_name_get(child); 517 name = efl_name_get(child);
522 klass_name = efl_class_name_get(efl_class_get(child)); 518 klass_name = efl_class_name_get(efl_class_get(child));
523 if (_name_match(klass, klass_glob, klass_name) && 519 if (_name_match(klass, klass_glob, klass_name) &&
@@ -535,11 +531,7 @@ _efl_object_name_find(const Eo *obj EINA_UNUSED, Efl_Object_Data *pd, const char
535 // we have a glob - fnmatch 531 // we have a glob - fnmatch
536 EINA_INLIST_FOREACH(pd->children, child_eo) 532 EINA_INLIST_FOREACH(pd->children, child_eo)
537 { 533 {
538#ifdef EO_NO_PTR_INDIRECTION
539 child = (Eo*)child_eo;
540#else
541 child = _eo_obj_id_get(child_eo); 534 child = _eo_obj_id_get(child_eo);
542#endif
543 name = efl_name_get(child); 535 name = efl_name_get(child);
544 if ((name) && (_name_match(search, EINA_TRUE, name))) 536 if ((name) && (_name_match(search, EINA_TRUE, name)))
545 return child; 537 return child;
@@ -552,11 +544,7 @@ _efl_object_name_find(const Eo *obj EINA_UNUSED, Efl_Object_Data *pd, const char
552 // fast path for simple "name" 544 // fast path for simple "name"
553 EINA_INLIST_FOREACH(pd->children, child_eo) 545 EINA_INLIST_FOREACH(pd->children, child_eo)
554 { 546 {
555#ifdef EO_NO_PTR_INDIRECTION
556 child = (Eo*)child_eo;
557#else
558 child = _eo_obj_id_get(child_eo); 547 child = _eo_obj_id_get(child_eo);
559#endif
560 name = efl_name_get(child); 548 name = efl_name_get(child);
561 if ((name) && (_name_match(search, EINA_FALSE, name))) 549 if ((name) && (_name_match(search, EINA_FALSE, name)))
562 return child; 550 return child;
@@ -729,11 +717,7 @@ _efl_children_iterator_next(Eo_Children_Iterator *it, void **data)
729 if (data) 717 if (data)
730 { 718 {
731 _Eo_Object *eo_obj = EINA_INLIST_CONTAINER_GET(it->current, _Eo_Object); 719 _Eo_Object *eo_obj = EINA_INLIST_CONTAINER_GET(it->current, _Eo_Object);
732#ifdef EO_NO_PTR_INDIRECTION
733 *data = eo_obj;
734#else
735 *data = _eo_obj_id_get(eo_obj); 720 *data = _eo_obj_id_get(eo_obj);
736#endif
737 } 721 }
738 it->current = it->current->next; 722 it->current = it->current->next;
739 723
@@ -2039,13 +2023,8 @@ err_parent_back:
2039children: 2023children:
2040 while (pd->children) 2024 while (pd->children)
2041 { 2025 {
2042#ifdef EO_NO_PTR_INDIRECTION
2043 child = (Eo*)EINA_INLIST_CONTAINER_GET(pd->children, _Eo_Object);
2044#else
2045 child = _eo_obj_id_get(EINA_INLIST_CONTAINER_GET(pd->children, _Eo_Object)); 2026 child = _eo_obj_id_get(EINA_INLIST_CONTAINER_GET(pd->children, _Eo_Object));
2046#endif
2047 efl_parent_set(child, NULL); 2027 efl_parent_set(child, NULL);
2048
2049 } 2028 }
2050 goto children_back; 2029 goto children_back;
2051 2030
diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h
index 6879cdae58..38f8c9eb03 100644
--- a/src/lib/eo/eo_private.h
+++ b/src/lib/eo/eo_private.h
@@ -226,11 +226,7 @@ Eo *_eo_header_id_get(const Eo_Header *header)
226} 226}
227 227
228/* Retrieves the pointer to the object from the id */ 228/* Retrieves the pointer to the object from the id */
229#ifdef EO_NO_PTR_INDIRECTION
230#define _eo_obj_pointer_get(ObjId, Func, File, Line) ((_Eo_Object *)(ObjId))
231#else
232_Eo_Object *_eo_obj_pointer_get(const Eo_Id obj_id, const char *func_name, const char *file, int line); 229_Eo_Object *_eo_obj_pointer_get(const Eo_Id obj_id, const char *func_name, const char *file, int line);
233#endif
234 230
235static inline 231static inline
236Efl_Class *_eo_class_id_get(const _Efl_Class *klass) 232Efl_Class *_eo_class_id_get(const _Efl_Class *klass)
@@ -258,19 +254,11 @@ _efl_del_internal(_Eo_Object *obj, const char *func_name, const char *file, int
258 254
259 const _Efl_Class *klass = obj->klass; 255 const _Efl_Class *klass = obj->klass;
260 256
261#ifdef EO_NO_PTR_INDIRECTION
262 efl_event_callback_call((Eo*)obj, EFL_EVENT_DEL, NULL);
263#else
264 efl_event_callback_call(_eo_obj_id_get(obj), EFL_EVENT_DEL, NULL); 257 efl_event_callback_call(_eo_obj_id_get(obj), EFL_EVENT_DEL, NULL);
265#endif
266 258
267 _eo_condtor_reset(obj); 259 _eo_condtor_reset(obj);
268 260
269#ifdef EO_NO_PTR_INDIRECTION
270 efl_destructor((Eo*)obj);
271#else
272 efl_destructor(_eo_obj_id_get(obj)); 261 efl_destructor(_eo_obj_id_get(obj));
273#endif
274 262
275 if (!obj->condtor_done) 263 if (!obj->condtor_done)
276 { 264 {
@@ -284,11 +272,7 @@ _efl_del_internal(_Eo_Object *obj, const char *func_name, const char *file, int
284 Eo *emb_obj; 272 Eo *emb_obj;
285 EINA_LIST_FOREACH_SAFE(obj->opt->composite_objects, itr, itr_n, emb_obj) 273 EINA_LIST_FOREACH_SAFE(obj->opt->composite_objects, itr, itr_n, emb_obj)
286 { 274 {
287#ifdef EO_NO_PTR_INDIRECTION
288 efl_composite_detach((Eo*)obj, emb_obj);
289#else
290 efl_composite_detach(_eo_obj_id_get(obj), emb_obj); 275 efl_composite_detach(_eo_obj_id_get(obj), emb_obj);
291#endif
292 } 276 }
293 } 277 }
294 278
@@ -341,11 +325,7 @@ _efl_unref_internal(_Eo_Object *obj, const char *func_name, const char *file, in
341 325
342 if (obj->opt->del_intercept) 326 if (obj->opt->del_intercept)
343 { 327 {
344#ifdef EO_NO_PTR_INDIRECTION
345 Eo *obj_id = (Eo*)obj;
346#else
347 Eo *obj_id = _eo_obj_id_get(obj); 328 Eo *obj_id = _eo_obj_id_get(obj);
348#endif
349 efl_ref(obj_id); 329 efl_ref(obj_id);
350 obj->opt->del_intercept(obj_id); 330 obj->opt->del_intercept(obj_id);
351 return; 331 return;
diff --git a/src/lib/eo/eo_ptr_indirection.c b/src/lib/eo/eo_ptr_indirection.c
index a2ff186339..01db8a289a 100644
--- a/src/lib/eo/eo_ptr_indirection.c
+++ b/src/lib/eo/eo_ptr_indirection.c
@@ -25,7 +25,6 @@ _eo_pointer_error(const Eo *obj_id, const char *func_name, const char *file, int
25 _eo_log_obj_report((Eo_Id)obj_id, EINA_LOG_LEVEL_ERR, func_name, file, line); 25 _eo_log_obj_report((Eo_Id)obj_id, EINA_LOG_LEVEL_ERR, func_name, file, line);
26} 26}
27 27
28#ifndef EO_NO_PTR_INDIRECTION
29static void 28static void
30_eo_obj_pointer_invalid(const Eo_Id obj_id, 29_eo_obj_pointer_invalid(const Eo_Id obj_id,
31 Eo_Id_Data *data, 30 Eo_Id_Data *data,
@@ -190,4 +189,3 @@ err:
190 _eo_obj_pointer_invalid(obj_id, data, domain, func_name, file, line); 189 _eo_obj_pointer_invalid(obj_id, data, domain, func_name, file, line);
191 return NULL; 190 return NULL;
192} 191}
193#endif
diff --git a/src/lib/eo/eo_ptr_indirection.h b/src/lib/eo/eo_ptr_indirection.h
index f83808f853..9cde5ba0c2 100644
--- a/src/lib/eo/eo_ptr_indirection.h
+++ b/src/lib/eo/eo_ptr_indirection.h
@@ -56,7 +56,7 @@ void _eo_pointer_error(const Eo *obj_id, const char *func_name, const char *file
56 _Eo_Object *obj; \ 56 _Eo_Object *obj; \
57 do { \ 57 do { \
58 obj = _eo_obj_pointer_get((Eo_Id)obj_id, __FUNCTION__, __FILE__, __LINE__); \ 58 obj = _eo_obj_pointer_get((Eo_Id)obj_id, __FUNCTION__, __FILE__, __LINE__); \
59 if (EINA_UNLIKELY(!obj)) goto label; \ 59 if (!obj) goto label; \
60 } while (0) 60 } while (0)
61 61
62#define EO_OBJ_POINTER_GOTO_PROXY(obj_id, obj, label) \ 62#define EO_OBJ_POINTER_GOTO_PROXY(obj_id, obj, label) \
@@ -132,13 +132,8 @@ void _eo_pointer_error(const Eo *obj_id, const char *func_name, const char *file
132 if (!klass) goto label; \ 132 if (!klass) goto label; \
133 } while (0) 133 } while (0)
134 134
135#ifdef EO_NO_PTR_INDIRECTION 135#define EO_OBJ_DONE(obj_id) \
136# define EO_OBJ_DONE(obj_id) \
137 _eo_obj_pointer_done((Eo_Id)_eo_obj_id_get((const _Eo_Object*)obj_id))
138#else
139# define EO_OBJ_DONE(obj_id) \
140 _eo_obj_pointer_done((Eo_Id)obj_id) 136 _eo_obj_pointer_done((Eo_Id)obj_id)
141#endif
142 137
143#ifdef EFL_DEBUG 138#ifdef EFL_DEBUG
144static inline void _eo_print(Eo_Id_Table_Data *tdata); 139static inline void _eo_print(Eo_Id_Table_Data *tdata);
diff --git a/src/lib/eo/eo_ptr_indirection.x b/src/lib/eo/eo_ptr_indirection.x
index 49fc9c0b0e..f4311e1c3a 100644
--- a/src/lib/eo/eo_ptr_indirection.x
+++ b/src/lib/eo/eo_ptr_indirection.x
@@ -368,10 +368,6 @@ _eo_table_data_table_get(Eo_Id_Data *data, Efl_Id_Domain domain)
368static inline Eina_Bool 368static inline Eina_Bool
369_eo_id_domain_compatible(const Eo *o1, const Eo *o2) 369_eo_id_domain_compatible(const Eo *o1, const Eo *o2)
370{ 370{
371#ifdef EO_NO_PTR_INDIRECTION
372 o1 = _eo_obj_id_get((const _Eo_Object*)o1);
373 o2 = _eo_obj_id_get((const _Eo_Object*)o2);
374#endif
375 Efl_Id_Domain domain1 = ((Eo_Id)o1 >> SHIFT_DOMAIN) & MASK_DOMAIN; 371 Efl_Id_Domain domain1 = ((Eo_Id)o1 >> SHIFT_DOMAIN) & MASK_DOMAIN;
376 Efl_Id_Domain domain2 = ((Eo_Id)o2 >> SHIFT_DOMAIN) & MASK_DOMAIN; 372 Efl_Id_Domain domain2 = ((Eo_Id)o2 >> SHIFT_DOMAIN) & MASK_DOMAIN;
377 if (domain1 == domain2) return EINA_TRUE; 373 if (domain1 == domain2) return EINA_TRUE;
@@ -513,9 +509,6 @@ _eo_id_allocate(const _Eo_Object *obj, const Eo *parent_id)
513 data = _eo_table_data_get(); 509 data = _eo_table_data_get();
514 if (parent_id) 510 if (parent_id)
515 { 511 {
516#ifdef EO_NO_PTR_INDIRECTION
517 parent_id = (const Eo *)(((const Eo_Header *)parent_id)->id);
518#endif
519 Efl_Id_Domain domain = ((Eo_Id)parent_id >> SHIFT_DOMAIN) & MASK_DOMAIN; 512 Efl_Id_Domain domain = ((Eo_Id)parent_id >> SHIFT_DOMAIN) & MASK_DOMAIN;
520 tdata = _eo_table_data_table_get(data, domain); 513 tdata = _eo_table_data_table_get(data, domain);
521 } 514 }