summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-09-27 12:09:14 +0100
committerTom Hacohen <tom@stosb.com>2013-09-27 14:01:47 +0100
commit01effff86f872c88a4851effa480a8fc40517ed0 (patch)
tree782b0b686256d23c3d6c7a03a0347885301cb362 /src
parentc64637e500d881867d9f95aa806f9d3cbcd13775 (diff)
Eo: Get rid of the _Eo type, it's not needed.
We have Eo_Base for that.
Diffstat (limited to 'src')
-rw-r--r--src/lib/eo/eo.c20
-rw-r--r--src/lib/eo/eo_private.h4
2 files changed, 10 insertions, 14 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index d9f1f6aebe..83d03f0c8f 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -266,7 +266,7 @@ _eo_kls_itr_func_get(const _Eo_Class *cur_klass, Eo_Op op)
266 while (0) 266 while (0)
267 267
268static inline Eina_Bool 268static inline Eina_Bool
269_eo_op_internal(const char *file, int line, _Eo eo_ptr, const _Eo_Class *cur_klass, 269_eo_op_internal(const char *file, int line, Eo_Base *eo_ptr, const _Eo_Class *cur_klass,
270 Eo_Op_Type op_type, Eo_Op op, va_list *p_list) 270 Eo_Op_Type op_type, Eo_Op op, va_list *p_list)
271{ 271{
272#ifdef EO_DEBUG 272#ifdef EO_DEBUG
@@ -296,8 +296,8 @@ _eo_op_internal(const char *file, int line, _Eo eo_ptr, const _Eo_Class *cur_kla
296 Eo *calling_obj; 296 Eo *calling_obj;
297 if (op_type == EO_OP_TYPE_REGULAR) 297 if (op_type == EO_OP_TYPE_REGULAR)
298 { 298 {
299 func_data = _eo_data_scope_get(eo_ptr.obj, func->src); 299 func_data = _eo_data_scope_get((_Eo_Object *) eo_ptr, func->src);
300 calling_obj = _eo_id_get((Eo *) eo_ptr.obj); 300 calling_obj = _eo_id_get((Eo *) eo_ptr);
301 } 301 }
302 else 302 else
303 { 303 {
@@ -313,11 +313,11 @@ _eo_op_internal(const char *file, int line, _Eo eo_ptr, const _Eo_Class *cur_kla
313 { 313 {
314 Eina_List *itr; 314 Eina_List *itr;
315 Eo *emb_obj_id; 315 Eo *emb_obj_id;
316 EINA_LIST_FOREACH(eo_ptr.obj->composite_objects, itr, emb_obj_id) 316 EINA_LIST_FOREACH(((_Eo_Object *) eo_ptr)->composite_objects, itr, emb_obj_id)
317 { 317 {
318 /* FIXME: Clean this up a bit. */ 318 /* FIXME: Clean this up a bit. */
319 EO_OBJ_POINTER_RETURN_VAL(emb_obj_id, emb_obj, EINA_FALSE); 319 EO_OBJ_POINTER_RETURN_VAL(emb_obj_id, emb_obj, EINA_FALSE);
320 if (_eo_op_internal(file, line, (_Eo)emb_obj, emb_obj->klass, op_type, op, p_list)) 320 if (_eo_op_internal(file, line, (Eo_Base *) emb_obj, emb_obj->klass, op_type, op, p_list))
321 { 321 {
322 return EINA_TRUE; 322 return EINA_TRUE;
323 } 323 }
@@ -339,7 +339,7 @@ _eo_obj_dov_internal(const char *file, int line, _Eo_Object *obj, va_list *p_lis
339 op = va_arg(*p_list, Eo_Op); 339 op = va_arg(*p_list, Eo_Op);
340 while (op) 340 while (op)
341 { 341 {
342 if (!_eo_op_internal(file, line, (_Eo)obj, obj->klass, EO_OP_TYPE_REGULAR, op, p_list)) 342 if (!_eo_op_internal(file, line, (Eo_Base *) obj, obj->klass, EO_OP_TYPE_REGULAR, op, p_list))
343 { 343 {
344 _EO_OP_ERR_NO_OP_PRINT(file, line, op, obj->klass); 344 _EO_OP_ERR_NO_OP_PRINT(file, line, op, obj->klass);
345 ret = EINA_FALSE; 345 ret = EINA_FALSE;
@@ -366,7 +366,7 @@ _eo_class_dov_internal(const char *file, int line, _Eo_Class *klass, va_list *p_
366 op = va_arg(*p_list, Eo_Op); 366 op = va_arg(*p_list, Eo_Op);
367 while (op) 367 while (op)
368 { 368 {
369 if (!_eo_op_internal(file, line, (_Eo)klass, klass, EO_OP_TYPE_CLASS, op, p_list)) 369 if (!_eo_op_internal(file, line, (Eo_Base *) klass, klass, EO_OP_TYPE_CLASS, op, p_list))
370 { 370 {
371 _EO_OP_ERR_NO_OP_PRINT(file, line, op, klass); 371 _EO_OP_ERR_NO_OP_PRINT(file, line, op, klass);
372 ret = EINA_FALSE; 372 ret = EINA_FALSE;
@@ -433,13 +433,13 @@ eo_do_super_internal(const char *file, int line, const Eo *obj_id, const Eo *cur
433 { 433 {
434 EO_CLASS_POINTER_RETURN_VAL(obj_id, klass, EINA_FALSE); 434 EO_CLASS_POINTER_RETURN_VAL(obj_id, klass, EINA_FALSE);
435 nklass = _eo_kls_itr_next(klass, cur_klass, op); 435 nklass = _eo_kls_itr_next(klass, cur_klass, op);
436 op_ret = _eo_op_internal(file, line, (_Eo)klass, nklass, EO_OP_TYPE_CLASS, op, &p_list); 436 op_ret = _eo_op_internal(file, line, (Eo_Base *) klass, nklass, EO_OP_TYPE_CLASS, op, &p_list);
437 } 437 }
438 else 438 else
439 { 439 {
440 EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, EINA_FALSE); 440 EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, EINA_FALSE);
441 nklass = _eo_kls_itr_next(obj->klass, cur_klass, op); 441 nklass = _eo_kls_itr_next(obj->klass, cur_klass, op);
442 op_ret = _eo_op_internal(file, line, (_Eo)obj, nklass, EO_OP_TYPE_REGULAR, op, &p_list); 442 op_ret = _eo_op_internal(file, line, (Eo_Base *) obj, nklass, EO_OP_TYPE_REGULAR, op, &p_list);
443 if (obj->do_error) 443 if (obj->do_error)
444 ret = EINA_FALSE; 444 ret = EINA_FALSE;
445 } 445 }
@@ -1038,7 +1038,7 @@ _eo_parent_internal_set(_Eo_Object *obj, ...)
1038 va_list p_list; 1038 va_list p_list;
1039 1039
1040 va_start(p_list, obj); 1040 va_start(p_list, obj);
1041 _eo_op_internal(__FILE__, __LINE__, (_Eo)obj, obj->klass, 1041 _eo_op_internal(__FILE__, __LINE__, (Eo_Base *) obj, obj->klass,
1042 EO_OP_TYPE_REGULAR, EO_BASE_ID(EO_BASE_SUB_ID_PARENT_SET), 1042 EO_OP_TYPE_REGULAR, EO_BASE_ID(EO_BASE_SUB_ID_PARENT_SET),
1043 &p_list); 1043 &p_list);
1044 va_end(p_list); 1044 va_end(p_list);
diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h
index 9e79f6f838..6d9f8fa173 100644
--- a/src/lib/eo/eo_private.h
+++ b/src/lib/eo/eo_private.h
@@ -58,10 +58,6 @@ typedef uintptr_t Eo_Id;
58typedef struct _Eo_Class _Eo_Class; 58typedef struct _Eo_Class _Eo_Class;
59typedef struct _Eo_Object _Eo_Object; 59typedef struct _Eo_Object _Eo_Object;
60typedef struct _Eo_Base Eo_Base; 60typedef struct _Eo_Base Eo_Base;
61typedef union _Eo {
62 _Eo_Object *obj;
63 _Eo_Class *klass;
64} _Eo;
65 61
66/* Retrieves the pointer to the object from the id */ 62/* Retrieves the pointer to the object from the id */
67static inline _Eo_Object *_eo_obj_pointer_get(const Eo_Id obj_id); 63static inline _Eo_Object *_eo_obj_pointer_get(const Eo_Id obj_id);