diff options
author | Tom Hacohen <tom@stosb.com> | 2015-05-28 16:49:13 +0100 |
---|---|---|
committer | Tom Hacohen <tom@stosb.com> | 2015-05-28 17:47:59 +0100 |
commit | 293d286977acb8a5ac5da72241de2c2912dfa1d9 (patch) | |
tree | c6985f6706bf357e2314deaa65f96f2077960085 /src | |
parent | 3aabb41d1d05eb05fbefa9ab76f2bdbc6b322ffe (diff) |
Eo: rename conflicting internal Eo_Base to Eo_Header
This name conflicts with the class Eo.Base and should have
been called Eo_Header from the start anyway.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/eo/eo.c | 10 | ||||
-rw-r--r-- | src/lib/eo/eo_private.h | 14 | ||||
-rw-r--r-- | src/lib/eo/eo_ptr_indirection.h | 8 | ||||
-rw-r--r-- | 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 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) | |||
151 | #else | 151 | #else |
152 | /* fortunately EO_OBJ_POINTER_RETURN* will handle NULL eo_id */ | 152 | /* fortunately EO_OBJ_POINTER_RETURN* will handle NULL eo_id */ |
153 | if (!eo_id) return EINA_FALSE; | 153 | if (!eo_id) return EINA_FALSE; |
154 | oid = ((Eo_Base *) eo_id)->id; | 154 | oid = ((Eo_Header *) eo_id)->id; |
155 | #endif | 155 | #endif |
156 | return ((((oid >> REF_TAG_SHIFT) & 0x1) == 0x0) && | 156 | return ((((oid >> REF_TAG_SHIFT) & 0x1) == 0x0) && |
157 | (oid & MASK_CLASS_TAG)); | 157 | (oid & MASK_CLASS_TAG)); |
@@ -899,7 +899,7 @@ _eo_add_internal_start(const char *file, int line, const Eo_Class *klass_id, Eo | |||
899 | obj->klass = klass; | 899 | obj->klass = klass; |
900 | 900 | ||
901 | #ifndef HAVE_EO_ID | 901 | #ifndef HAVE_EO_ID |
902 | EINA_MAGIC_SET((Eo_Base *) obj, EO_EINA_MAGIC); | 902 | EINA_MAGIC_SET((Eo_Header *) obj, EO_EINA_MAGIC); |
903 | #endif | 903 | #endif |
904 | obj->header.id = _eo_id_allocate(obj); | 904 | obj->header.id = _eo_id_allocate(obj); |
905 | Eo *eo_id = _eo_id_get(obj); | 905 | Eo *eo_id = _eo_id_get(obj); |
@@ -1233,9 +1233,9 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...) | |||
1233 | 1233 | ||
1234 | _Eo_Class *parent = _eo_class_pointer_get(parent_id); | 1234 | _Eo_Class *parent = _eo_class_pointer_get(parent_id); |
1235 | #ifndef HAVE_EO_ID | 1235 | #ifndef HAVE_EO_ID |
1236 | if (parent && !EINA_MAGIC_CHECK((Eo_Base *) parent, EO_CLASS_EINA_MAGIC)) | 1236 | if (parent && !EINA_MAGIC_CHECK((Eo_Header *) parent, EO_CLASS_EINA_MAGIC)) |
1237 | { | 1237 | { |
1238 | EINA_MAGIC_FAIL((Eo_Base *) parent, EO_CLASS_EINA_MAGIC); | 1238 | EINA_MAGIC_FAIL((Eo_Header *) parent, EO_CLASS_EINA_MAGIC); |
1239 | return NULL; | 1239 | return NULL; |
1240 | } | 1240 | } |
1241 | #endif | 1241 | #endif |
@@ -1350,7 +1350,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...) | |||
1350 | 1350 | ||
1351 | klass = calloc(1, _eo_class_sz + extn_sz + mro_sz + mixins_sz); | 1351 | klass = calloc(1, _eo_class_sz + extn_sz + mro_sz + mixins_sz); |
1352 | #ifndef HAVE_EO_ID | 1352 | #ifndef HAVE_EO_ID |
1353 | EINA_MAGIC_SET((Eo_Base *) klass, EO_CLASS_EINA_MAGIC); | 1353 | EINA_MAGIC_SET((Eo_Header *) klass, EO_CLASS_EINA_MAGIC); |
1354 | #endif | 1354 | #endif |
1355 | eina_spinlock_new(&klass->objects.trash_lock); | 1355 | eina_spinlock_new(&klass->objects.trash_lock); |
1356 | eina_spinlock_new(&klass->iterators.trash_lock); | 1356 | 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; | |||
62 | typedef uintptr_t Eo_Id; | 62 | typedef uintptr_t Eo_Id; |
63 | typedef struct _Eo_Class _Eo_Class; | 63 | typedef struct _Eo_Class _Eo_Class; |
64 | typedef struct _Eo_Object _Eo_Object; | 64 | typedef struct _Eo_Object _Eo_Object; |
65 | typedef struct _Eo_Base Eo_Base; | 65 | typedef struct _Eo_Header Eo_Header; |
66 | 66 | ||
67 | /* Retrieves the pointer to the object from the id */ | 67 | /* Retrieves the pointer to the object from the id */ |
68 | static inline _Eo_Object *_eo_obj_pointer_get(const Eo_Id obj_id); | 68 | 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); | |||
78 | 78 | ||
79 | void _eo_condtor_done(Eo *obj); | 79 | void _eo_condtor_done(Eo *obj); |
80 | 80 | ||
81 | struct _Eo_Base | 81 | struct _Eo_Header |
82 | { | 82 | { |
83 | #ifndef HAVE_EO_ID | 83 | #ifndef HAVE_EO_ID |
84 | EINA_MAGIC | 84 | EINA_MAGIC |
@@ -88,7 +88,7 @@ struct _Eo_Base | |||
88 | 88 | ||
89 | struct _Eo_Object | 89 | struct _Eo_Object |
90 | { | 90 | { |
91 | Eo_Base header; | 91 | Eo_Header header; |
92 | const _Eo_Class *klass; | 92 | const _Eo_Class *klass; |
93 | #ifdef EO_DEBUG | 93 | #ifdef EO_DEBUG |
94 | Eina_Inlist *xrefs; | 94 | Eina_Inlist *xrefs; |
@@ -133,7 +133,7 @@ typedef struct | |||
133 | 133 | ||
134 | struct _Eo_Class | 134 | struct _Eo_Class |
135 | { | 135 | { |
136 | Eo_Base header; | 136 | Eo_Header header; |
137 | 137 | ||
138 | const _Eo_Class *parent; | 138 | const _Eo_Class *parent; |
139 | const Eo_Class_Description *desc; | 139 | const Eo_Class_Description *desc; |
@@ -179,7 +179,7 @@ typedef struct | |||
179 | } Eo_Xref_Node; | 179 | } Eo_Xref_Node; |
180 | 180 | ||
181 | static inline | 181 | static inline |
182 | Eo *_eo_header_id_get(const Eo_Base *header) | 182 | Eo *_eo_header_id_get(const Eo_Header *header) |
183 | { | 183 | { |
184 | #ifdef HAVE_EO_ID | 184 | #ifdef HAVE_EO_ID |
185 | return (Eo *) header->id; | 185 | return (Eo *) header->id; |
@@ -191,13 +191,13 @@ Eo *_eo_header_id_get(const Eo_Base *header) | |||
191 | static inline | 191 | static inline |
192 | Eo_Class *_eo_class_id_get(const _Eo_Class *klass) | 192 | Eo_Class *_eo_class_id_get(const _Eo_Class *klass) |
193 | { | 193 | { |
194 | return _eo_header_id_get((Eo_Base *) klass); | 194 | return _eo_header_id_get((Eo_Header *) klass); |
195 | } | 195 | } |
196 | 196 | ||
197 | static inline | 197 | static inline |
198 | Eo *_eo_id_get(const _Eo_Object *obj) | 198 | Eo *_eo_id_get(const _Eo_Object *obj) |
199 | { | 199 | { |
200 | return _eo_header_id_get((Eo_Base *) obj); | 200 | return _eo_header_id_get((Eo_Header *) obj); |
201 | } | 201 | } |
202 | 202 | ||
203 | static inline void | 203 | 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 @@ | |||
60 | _Eo_Object *obj; \ | 60 | _Eo_Object *obj; \ |
61 | do { \ | 61 | do { \ |
62 | obj = _eo_obj_pointer_get((Eo_Id)obj_id); \ | 62 | obj = _eo_obj_pointer_get((Eo_Id)obj_id); \ |
63 | EO_MAGIC_RETURN_VAL((Eo_Base *) obj, EO_EINA_MAGIC, ret); \ | 63 | EO_MAGIC_RETURN_VAL((Eo_Header *) obj, EO_EINA_MAGIC, ret); \ |
64 | } while (0) | 64 | } while (0) |
65 | 65 | ||
66 | #define EO_OBJ_POINTER_RETURN(obj_id, obj) \ | 66 | #define EO_OBJ_POINTER_RETURN(obj_id, obj) \ |
67 | _Eo_Object *obj; \ | 67 | _Eo_Object *obj; \ |
68 | do { \ | 68 | do { \ |
69 | obj = _eo_obj_pointer_get((Eo_Id)obj_id); \ | 69 | obj = _eo_obj_pointer_get((Eo_Id)obj_id); \ |
70 | EO_MAGIC_RETURN((Eo_Base *) obj, EO_EINA_MAGIC); \ | 70 | EO_MAGIC_RETURN((Eo_Header *) obj, EO_EINA_MAGIC); \ |
71 | } while (0) | 71 | } while (0) |
72 | 72 | ||
73 | #define EO_CLASS_POINTER_RETURN_VAL(klass_id, klass, ret) \ | 73 | #define EO_CLASS_POINTER_RETURN_VAL(klass_id, klass, ret) \ |
74 | _Eo_Class *klass; \ | 74 | _Eo_Class *klass; \ |
75 | do { \ | 75 | do { \ |
76 | klass = _eo_class_pointer_get(klass_id); \ | 76 | klass = _eo_class_pointer_get(klass_id); \ |
77 | EO_MAGIC_RETURN_VAL((Eo_Base *) klass, EO_CLASS_EINA_MAGIC, ret); \ | 77 | EO_MAGIC_RETURN_VAL((Eo_Header *) klass, EO_CLASS_EINA_MAGIC, ret); \ |
78 | } while (0) | 78 | } while (0) |
79 | 79 | ||
80 | #define EO_CLASS_POINTER_RETURN(klass_id, klass) \ | 80 | #define EO_CLASS_POINTER_RETURN(klass_id, klass) \ |
81 | _Eo_Class *klass; \ | 81 | _Eo_Class *klass; \ |
82 | do { \ | 82 | do { \ |
83 | klass = _eo_class_pointer_get(klass_id); \ | 83 | klass = _eo_class_pointer_get(klass_id); \ |
84 | EO_MAGIC_RETURN((Eo_Base *) klass, EO_CLASS_EINA_MAGIC); \ | 84 | EO_MAGIC_RETURN((Eo_Header *) klass, EO_CLASS_EINA_MAGIC); \ |
85 | } while (0) | 85 | } while (0) |
86 | 86 | ||
87 | #endif | 87 | #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) | |||
474 | 474 | ||
475 | ERR("obj_id %p is not pointing to a valid object. Maybe it has already been freed.", (void *)obj_id); | 475 | ERR("obj_id %p is not pointing to a valid object. Maybe it has already been freed.", (void *)obj_id); |
476 | #else | 476 | #else |
477 | EINA_MAGIC_SET((Eo_Base *) obj_id, EO_FREED_EINA_MAGIC); | 477 | EINA_MAGIC_SET((Eo_Header *) obj_id, EO_FREED_EINA_MAGIC); |
478 | #endif | 478 | #endif |
479 | } | 479 | } |
480 | 480 | ||