diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 588e74ab2b..c143a4a968 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -151,7 +151,7 @@ _eo_is_a_class(const Eo *eo_id) #else /* fortunately EO_OBJ_POINTER_RETURN* will handle NULL eo_id */ if (!eo_id) return EINA_FALSE; - oid = ((Eo_Base *) eo_id)->id; + oid = ((Eo_Header *) eo_id)->id; #endif return ((((oid >> REF_TAG_SHIFT) & 0x1) == 0x0) && (oid & MASK_CLASS_TAG)); @@ -899,7 +899,7 @@ _eo_add_internal_start(const char *file, int line, const Eo_Class *klass_id, Eo obj->klass = klass; #ifndef HAVE_EO_ID - EINA_MAGIC_SET((Eo_Base *) obj, EO_EINA_MAGIC); + EINA_MAGIC_SET((Eo_Header *) obj, EO_EINA_MAGIC); #endif obj->header.id = _eo_id_allocate(obj); Eo *eo_id = _eo_id_get(obj); @@ -1233,9 +1233,9 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...) _Eo_Class *parent = _eo_class_pointer_get(parent_id); #ifndef HAVE_EO_ID - if (parent && !EINA_MAGIC_CHECK((Eo_Base *) parent, EO_CLASS_EINA_MAGIC)) + if (parent && !EINA_MAGIC_CHECK((Eo_Header *) parent, EO_CLASS_EINA_MAGIC)) { - EINA_MAGIC_FAIL((Eo_Base *) parent, EO_CLASS_EINA_MAGIC); + EINA_MAGIC_FAIL((Eo_Header *) parent, EO_CLASS_EINA_MAGIC); return NULL; } #endif @@ -1350,7 +1350,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...) klass = calloc(1, _eo_class_sz + extn_sz + mro_sz + mixins_sz); #ifndef HAVE_EO_ID - EINA_MAGIC_SET((Eo_Base *) klass, EO_CLASS_EINA_MAGIC); + EINA_MAGIC_SET((Eo_Header *) klass, EO_CLASS_EINA_MAGIC); #endif eina_spinlock_new(&klass->objects.trash_lock); eina_spinlock_new(&klass->iterators.trash_lock); diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h index 3a18dde57e..3cad4e681f 100644 --- a/src/lib/eo/eo_private.h +++ b/src/lib/eo/eo_private.h @@ -62,7 +62,7 @@ extern int _eo_log_dom; typedef uintptr_t Eo_Id; typedef struct _Eo_Class _Eo_Class; typedef struct _Eo_Object _Eo_Object; -typedef struct _Eo_Base Eo_Base; +typedef struct _Eo_Header Eo_Header; /* Retrieves the pointer to the object from the id */ static inline _Eo_Object *_eo_obj_pointer_get(const Eo_Id obj_id); @@ -78,7 +78,7 @@ static inline void _eo_free_ids_tables(void); void _eo_condtor_done(Eo *obj); -struct _Eo_Base +struct _Eo_Header { #ifndef HAVE_EO_ID EINA_MAGIC @@ -88,7 +88,7 @@ struct _Eo_Base struct _Eo_Object { - Eo_Base header; + Eo_Header header; const _Eo_Class *klass; #ifdef EO_DEBUG Eina_Inlist *xrefs; @@ -133,7 +133,7 @@ typedef struct struct _Eo_Class { - Eo_Base header; + Eo_Header header; const _Eo_Class *parent; const Eo_Class_Description *desc; @@ -179,7 +179,7 @@ typedef struct } Eo_Xref_Node; static inline -Eo *_eo_header_id_get(const Eo_Base *header) +Eo *_eo_header_id_get(const Eo_Header *header) { #ifdef HAVE_EO_ID return (Eo *) header->id; @@ -191,13 +191,13 @@ Eo *_eo_header_id_get(const Eo_Base *header) static inline Eo_Class *_eo_class_id_get(const _Eo_Class *klass) { - return _eo_header_id_get((Eo_Base *) klass); + return _eo_header_id_get((Eo_Header *) klass); } static inline Eo *_eo_id_get(const _Eo_Object *obj) { - return _eo_header_id_get((Eo_Base *) obj); + return _eo_header_id_get((Eo_Header *) obj); } static inline void diff --git a/src/lib/eo/eo_ptr_indirection.h b/src/lib/eo/eo_ptr_indirection.h index 3a255aa395..aa169f7924 100644 --- a/src/lib/eo/eo_ptr_indirection.h +++ b/src/lib/eo/eo_ptr_indirection.h @@ -60,28 +60,28 @@ _Eo_Object *obj; \ do { \ obj = _eo_obj_pointer_get((Eo_Id)obj_id); \ - EO_MAGIC_RETURN_VAL((Eo_Base *) obj, EO_EINA_MAGIC, ret); \ + EO_MAGIC_RETURN_VAL((Eo_Header *) obj, EO_EINA_MAGIC, ret); \ } while (0) #define EO_OBJ_POINTER_RETURN(obj_id, obj) \ _Eo_Object *obj; \ do { \ obj = _eo_obj_pointer_get((Eo_Id)obj_id); \ - EO_MAGIC_RETURN((Eo_Base *) obj, EO_EINA_MAGIC); \ + EO_MAGIC_RETURN((Eo_Header *) obj, EO_EINA_MAGIC); \ } while (0) #define EO_CLASS_POINTER_RETURN_VAL(klass_id, klass, ret) \ _Eo_Class *klass; \ do { \ klass = _eo_class_pointer_get(klass_id); \ - EO_MAGIC_RETURN_VAL((Eo_Base *) klass, EO_CLASS_EINA_MAGIC, ret); \ + EO_MAGIC_RETURN_VAL((Eo_Header *) klass, EO_CLASS_EINA_MAGIC, ret); \ } while (0) #define EO_CLASS_POINTER_RETURN(klass_id, klass) \ _Eo_Class *klass; \ do { \ klass = _eo_class_pointer_get(klass_id); \ - EO_MAGIC_RETURN((Eo_Base *) klass, EO_CLASS_EINA_MAGIC); \ + EO_MAGIC_RETURN((Eo_Header *) klass, EO_CLASS_EINA_MAGIC); \ } while (0) #endif diff --git a/src/lib/eo/eo_ptr_indirection.x b/src/lib/eo/eo_ptr_indirection.x index dbdf16864e..b92f29bc39 100644 --- a/src/lib/eo/eo_ptr_indirection.x +++ b/src/lib/eo/eo_ptr_indirection.x @@ -474,7 +474,7 @@ _eo_id_release(const Eo_Id obj_id) ERR("obj_id %p is not pointing to a valid object. Maybe it has already been freed.", (void *)obj_id); #else - EINA_MAGIC_SET((Eo_Base *) obj_id, EO_FREED_EINA_MAGIC); + EINA_MAGIC_SET((Eo_Header *) obj_id, EO_FREED_EINA_MAGIC); #endif }