From 1059f802bf7972001e258a70ae0ce82ae818cae3 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Fri, 27 Sep 2013 12:01:30 +0100 Subject: [PATCH] Eo: Rename Eo_Header to Eo_Base. --- src/lib/eo/eo.c | 10 +++++----- src/lib/eo/eo_private.h | 14 +++++++------- src/lib/eo/eo_ptr_indirection.h | 8 ++++---- src/lib/eo/eo_ptr_indirection.x | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 677d964..58e4583 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -143,7 +143,7 @@ _eo_is_a_class(const Eo *obj_id) #else /* fortunately EO_OBJ_POINTER_RETURN* will handle NULL obj_id */ if (!obj_id) return EINA_FALSE; - oid = ((Eo_Header *) obj_id)->id; + oid = ((Eo_Base *) obj_id)->id; #endif return (((oid >> REF_TAG_SHIFT) & 0x1) == 0x0); } @@ -761,9 +761,9 @@ eo_class_new(const Eo_Class_Description *desc, const Eo *parent_id, ...) _Eo_Class *parent = _eo_class_pointer_get(parent_id); #ifndef HAVE_EO_ID - if (parent && !EINA_MAGIC_CHECK((Eo_Header *) parent, EO_CLASS_EINA_MAGIC)) + if (parent && !EINA_MAGIC_CHECK((Eo_Base *) parent, EO_CLASS_EINA_MAGIC)) { - EINA_MAGIC_FAIL((Eo_Header *) parent, EO_CLASS_EINA_MAGIC); + EINA_MAGIC_FAIL((Eo_Base *) parent, EO_CLASS_EINA_MAGIC); return NULL; } #endif @@ -884,7 +884,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo *parent_id, ...) klass = calloc(1, _eo_class_sz + extn_sz + mro_sz + mixins_sz); #ifndef HAVE_EO_ID - EINA_MAGIC_SET((Eo_Header *) klass, EO_CLASS_EINA_MAGIC); + EINA_MAGIC_SET((Eo_Base *) klass, EO_CLASS_EINA_MAGIC); #endif eina_lock_new(&klass->objects.trash_lock); eina_lock_new(&klass->iterators.trash_lock); @@ -1079,7 +1079,7 @@ eo_add_internal(const char *file, int line, const Eo *klass_id, Eo *parent_id, . obj->klass = klass; #ifndef HAVE_EO_ID - EINA_MAGIC_SET((Eo_Header *) obj, EO_EINA_MAGIC); + EINA_MAGIC_SET((Eo_Base *) obj, EO_EINA_MAGIC); #endif Eo_Id obj_id = _eo_id_allocate(obj); obj->header.id = obj_id; diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h index a1ac9fe..9e79f6f 100644 --- a/src/lib/eo/eo_private.h +++ b/src/lib/eo/eo_private.h @@ -57,7 +57,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_Header Eo_Header; +typedef struct _Eo_Base Eo_Base; typedef union _Eo { _Eo_Object *obj; _Eo_Class *klass; @@ -77,7 +77,7 @@ static inline void _eo_free_ids_tables(void); void _eo_condtor_done(Eo *obj); -struct _Eo_Header +struct _Eo_Base { #ifndef HAVE_EO_ID EINA_MAGIC @@ -87,7 +87,7 @@ struct _Eo_Header struct _Eo_Object { - Eo_Header header; + Eo_Base header; Eo *parent; Eina_List *children; const _Eo_Class *klass; @@ -130,7 +130,7 @@ typedef struct struct _Eo_Class { - Eo_Header header; + Eo_Base header; const _Eo_Class *parent; const Eo_Class_Description *desc; @@ -176,7 +176,7 @@ typedef struct } Eo_Xref_Node; static inline -Eo *_eo_header_id_get(const Eo_Header *header) +Eo *_eo_header_id_get(const Eo_Base *header) { #ifdef HAVE_EO_ID return (Eo *) header->id; @@ -188,13 +188,13 @@ Eo *_eo_header_id_get(const Eo_Header *header) static inline Eo *_eo_class_id_get(const _Eo_Class *klass) { - return _eo_header_id_get((Eo_Header *) klass); + return _eo_header_id_get((Eo_Base *) klass); } static inline Eo *_eo_id_get(const Eo *obj) { - return _eo_header_id_get((Eo_Header *) obj); + return _eo_header_id_get((Eo_Base *) obj); } static inline void diff --git a/src/lib/eo/eo_ptr_indirection.h b/src/lib/eo/eo_ptr_indirection.h index 3e7dc28..9978701 100644 --- a/src/lib/eo/eo_ptr_indirection.h +++ b/src/lib/eo/eo_ptr_indirection.h @@ -42,28 +42,28 @@ _Eo_Object *obj; \ do { \ obj = _eo_obj_pointer_get((Eo_Id)obj_id); \ - EO_MAGIC_RETURN_VAL((Eo_Header *) obj, EO_EINA_MAGIC, ret); \ + EO_MAGIC_RETURN_VAL((Eo_Base *) 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_Header *) obj, EO_EINA_MAGIC); \ + EO_MAGIC_RETURN((Eo_Base *) 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_Header *) klass, EO_CLASS_EINA_MAGIC, ret); \ + EO_MAGIC_RETURN_VAL((Eo_Base *) 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_Header *) klass, EO_CLASS_EINA_MAGIC); \ + EO_MAGIC_RETURN((Eo_Base *) 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 bd1dcb1..9bfd584 100644 --- a/src/lib/eo/eo_ptr_indirection.x +++ b/src/lib/eo/eo_ptr_indirection.x @@ -454,7 +454,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_Header *) obj_id, EO_FREED_EINA_MAGIC); + EINA_MAGIC_SET((Eo_Base *) obj_id, EO_FREED_EINA_MAGIC); #endif } -- 2.7.4