diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index efbe0e3199..48d6a56ac9 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -25,10 +25,10 @@ static size_t _eo_sz = 0; static size_t _eo_class_sz = 0; static size_t _eo_handle_sz = 0; -static void _eo_condtor_reset(_Eo *obj); -static inline void *_eo_data_scope_get(const _Eo *obj, const _Eo_Class *klass); -static inline void *_eo_data_xref_internal(const char *file, int line, _Eo *obj, const _Eo_Class *klass, const _Eo *ref_obj); -static inline void _eo_data_xunref_internal(_Eo *obj, void *data, const _Eo *ref_obj); +static void _eo_condtor_reset(_Eo_Object *obj); +static inline void *_eo_data_scope_get(const _Eo_Object *obj, const _Eo_Class *klass); +static inline void *_eo_data_xref_internal(const char *file, int line, _Eo_Object *obj, const _Eo_Class *klass, const _Eo_Object *ref_obj); +static inline void _eo_data_xunref_internal(_Eo_Object *obj, void *data, const _Eo_Object *ref_obj); static const _Eo_Class *_eo_op_class_get(Eo_Op op); static const Eo_Op_Description *_eo_op_id_desc_get(Eo_Op op); @@ -262,7 +262,7 @@ _eo_kls_itr_func_get(const _Eo_Class *cur_klass, Eo_Op op) while (0) static inline Eina_Bool -_eo_op_internal(const char *file, int line, _Eo *obj, const _Eo_Class *cur_klass, +_eo_op_internal(const char *file, int line, _Eo_Object *obj, const _Eo_Class *cur_klass, Eo_Op_Type op_type, Eo_Op op, va_list *p_list) { #ifdef EO_DEBUG @@ -307,7 +307,7 @@ _eo_op_internal(const char *file, int line, _Eo *obj, const _Eo_Class *cur_klass } static inline Eina_Bool -_eo_dov_internal(const char *file, int line, _Eo *obj, Eo_Op_Type op_type, va_list *p_list) +_eo_dov_internal(const char *file, int line, _Eo_Object *obj, Eo_Op_Type op_type, va_list *p_list) { Eina_Bool prev_error; Eina_Bool ret = EINA_TRUE; @@ -1059,7 +1059,7 @@ eo_isa(const Eo *obj_id, const Eo *klass_id) // A little bit hacky, but does the job static void -_eo_parent_internal_set(_Eo *obj, ...) +_eo_parent_internal_set(_Eo_Object *obj, ...) { va_list p_list; @@ -1074,7 +1074,7 @@ EAPI Eo * eo_add_internal(const char *file, int line, const Eo *klass_id, Eo *parent_id, ...) { Eina_Bool do_err; - _Eo *obj; + _Eo_Object *obj; _Eo_Handle *hndl; EO_CLASS_POINTER_RETURN_VAL(klass_id, klass, NULL); @@ -1264,7 +1264,7 @@ _eo_condtor_done(Eo *obj_id) } static inline void * -_eo_data_scope_get(const _Eo *obj, const _Eo_Class *klass) +_eo_data_scope_get(const _Eo_Object *obj, const _Eo_Class *klass) { if (EINA_LIKELY((klass->desc->data_size > 0) && (klass->desc->type != EO_CLASS_TYPE_MIXIN))) return ((char *) obj) + _eo_sz + klass->data_offset; @@ -1291,7 +1291,7 @@ _eo_data_scope_get(const _Eo *obj, const _Eo_Class *klass) } static inline void * -_eo_data_xref_internal(const char *file, int line, _Eo *obj, const _Eo_Class *klass, const _Eo *ref_obj) +_eo_data_xref_internal(const char *file, int line, _Eo_Object *obj, const _Eo_Class *klass, const _Eo_Object *ref_obj) { void *data = NULL; if (klass != NULL) @@ -1316,7 +1316,7 @@ _eo_data_xref_internal(const char *file, int line, _Eo *obj, const _Eo_Class *kl } static inline void -_eo_data_xunref_internal(_Eo *obj, void *data, const _Eo *ref_obj) +_eo_data_xunref_internal(_Eo_Object *obj, void *data, const _Eo_Object *ref_obj) { #ifdef EO_DEBUG const _Eo_Class *klass = obj->klass; @@ -1442,9 +1442,9 @@ eo_init(void) eina_init(); - _eo_sz = EO_ALIGN_SIZE(sizeof (_Eo)); - _eo_class_sz = EO_ALIGN_SIZE(sizeof (_Eo_Class)); - _eo_handle_sz = EO_ALIGN_SIZE(sizeof (_Eo_Handle)); + _eo_sz = EO_ALIGN_SIZE(sizeof(_Eo_Object)); + _eo_class_sz = EO_ALIGN_SIZE(sizeof(_Eo_Class)); + _eo_handle_sz = EO_ALIGN_SIZE(sizeof(_Eo_Handle)); _eo_classes = NULL; _eo_classes_last_id = EO_CLASS_IDS_FIRST - 1; diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c index d8c8eaa4e7..640340e156 100644 --- a/src/lib/eo/eo_base_class.c +++ b/src/lib/eo/eo_base_class.c @@ -166,7 +166,7 @@ struct _Eo_Children_Iterator { Eina_Iterator iterator; Eina_List *current; - _Eo *obj; + _Eo_Object *obj; Eo *obj_id; }; @@ -192,7 +192,7 @@ static void _eo_children_iterator_free(Eo_Children_Iterator *it) { _Eo_Class *klass; - _Eo *obj; + _Eo_Object *obj; klass = (_Eo_Class*) it->obj->klass; obj = it->obj; diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h index 8b5367ba2e..fa61526164 100644 --- a/src/lib/eo/eo_private.h +++ b/src/lib/eo/eo_private.h @@ -56,14 +56,14 @@ extern int _eo_log_dom; typedef uintptr_t Eo_Id; typedef struct _Eo_Class _Eo_Class; -typedef struct _Eo_Object _Eo; +typedef struct _Eo_Object _Eo_Object; typedef struct _Eo_Handle _Eo_Handle; /* Retrieves the pointer to the object from the id */ -static inline _Eo *_eo_obj_pointer_get(const Eo_Id obj_id); +static inline _Eo_Object *_eo_obj_pointer_get(const Eo_Id obj_id); /* Allocates an entry for the given object */ -static inline Eo_Id _eo_id_allocate(const _Eo *obj); +static inline Eo_Id _eo_id_allocate(const _Eo_Object *obj); /* Releases an entry by the object id */ static inline void _eo_id_release(const Eo_Id obj_id); @@ -180,13 +180,13 @@ typedef struct } Eo_Xref_Node; static inline void -_eo_condtor_reset(_Eo *obj) +_eo_condtor_reset(_Eo_Object *obj) { obj->condtor_done = EINA_FALSE; } static inline void -_eo_del_internal(const char *file, int line, _Eo *obj) +_eo_del_internal(const char *file, int line, _Eo_Object *obj) { Eina_Bool do_err; /* We need that for the event callbacks that may ref/unref. */ @@ -226,7 +226,7 @@ _eo_del_internal(const char *file, int line, _Eo *obj) } static inline void -_eo_free(_Eo *obj) +_eo_free(_Eo_Object *obj) { _Eo_Class *klass = (_Eo_Class*) obj->klass; @@ -255,15 +255,15 @@ _eo_free(_Eo *obj) eina_lock_release(&klass->objects.trash_lock); } -static inline _Eo * -_eo_ref(_Eo *obj) +static inline _Eo_Object * +_eo_ref(_Eo_Object *obj) { obj->refcount++; return obj; } static inline void -_eo_unref(_Eo *obj) +_eo_unref(_Eo_Object *obj) { --(obj->refcount); if (obj->refcount == 0) diff --git a/src/lib/eo/eo_ptr_indirection.h b/src/lib/eo/eo_ptr_indirection.h index a8fd235101..60a70362ef 100644 --- a/src/lib/eo/eo_ptr_indirection.h +++ b/src/lib/eo/eo_ptr_indirection.h @@ -9,14 +9,14 @@ #ifdef HAVE_EO_ID #define EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, ret) \ - _Eo *obj; \ + _Eo_Object *obj; \ do { \ obj = _eo_obj_pointer_get((Eo_Id)obj_id); \ if (!obj) return ret; \ } while (0) #define EO_OBJ_POINTER_RETURN(obj_id, obj) \ - _Eo *obj; \ + _Eo_Object *obj; \ do { \ obj = _eo_obj_pointer_get((Eo_Id)obj_id); \ if (!obj) return; \ @@ -39,14 +39,14 @@ #else #define EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, ret) \ - _Eo *obj; \ + _Eo_Object *obj; \ do { \ obj = _eo_obj_pointer_get((Eo_Id)obj_id); \ EO_MAGIC_RETURN_VAL(obj, EO_EINA_MAGIC, ret); \ } while (0) #define EO_OBJ_POINTER_RETURN(obj_id, obj) \ - _Eo *obj; \ + _Eo_Object *obj; \ do { \ obj = _eo_obj_pointer_get((Eo_Id)obj_id); \ EO_MAGIC_RETURN(obj, EO_EINA_MAGIC); \ diff --git a/src/lib/eo/eo_ptr_indirection.x b/src/lib/eo/eo_ptr_indirection.x index b12919953b..8f8500f39b 100644 --- a/src/lib/eo/eo_ptr_indirection.x +++ b/src/lib/eo/eo_ptr_indirection.x @@ -191,14 +191,14 @@ _eo_id_mem_protect(void *ptr, Eina_Bool may_not_write) #ifndef HAVE_EO_ID # define HANDLE_FROM_EO(eo) (Eo_Id)( eo ? (((char *) eo) - EO_ALIGN_SIZE(sizeof (_Eo_Handle))) : NULL ) -# define EO_FROM_HANDLE(hndl) (_Eo *) ( hndl ? (((char *) hndl) + EO_ALIGN_SIZE(sizeof (_Eo_Handle))) : NULL ) +# define EO_FROM_HANDLE(hndl) (_Eo_Object *) ( hndl ? (((char *) hndl) + EO_ALIGN_SIZE(sizeof (_Eo_Handle))) : NULL ) #endif /* Entry */ typedef struct { /* Pointer to the object */ - _Eo *ptr; + _Eo_Object *ptr; /* Indicates where to find the next entry to recycle */ Table_Index next_in_fifo; /* Active flag */ @@ -258,7 +258,7 @@ extern Generation_Counter _eo_generation_counter; /* Macro used for readability */ #define TABLE_FROM_IDS _eo_ids_tables[mid_table_id][table_id] -static inline _Eo * +static inline _Eo_Object * _eo_obj_pointer_get(const Eo_Id obj_id) { #ifdef HAVE_EO_ID @@ -373,7 +373,7 @@ _search_tables(void) } static inline Eo_Id -_eo_id_allocate(const _Eo *obj) +_eo_id_allocate(const _Eo_Object *obj) { #ifdef HAVE_EO_ID _Eo_Id_Entry *entry = NULL; @@ -393,7 +393,7 @@ _eo_id_allocate(const _Eo *obj) if (_eo_generation_counter == MAX_GENERATIONS) _eo_generation_counter = 1; /* Fill the entry and return it's Eo Id */ - entry->ptr = (_Eo *)obj; + entry->ptr = (_Eo_Object *)obj; entry->active = 1; entry->generation = _eo_generation_counter; PROTECT(_current_table);