summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-09-27 12:01:30 +0100
committerTom Hacohen <tom@stosb.com>2013-09-27 14:01:47 +0100
commit1059f802bf7972001e258a70ae0ce82ae818cae3 (patch)
tree9fed9c3ba01a0c18655886af1ec791ab7d4588e2 /src
parent828928601ef1a54b90f685f97621708efbe5b0d6 (diff)
Eo: Rename Eo_Header to Eo_Base.
Diffstat (limited to 'src')
-rw-r--r--src/lib/eo/eo.c10
-rw-r--r--src/lib/eo/eo_private.h14
-rw-r--r--src/lib/eo/eo_ptr_indirection.h8
-rw-r--r--src/lib/eo/eo_ptr_indirection.x2
4 files changed, 17 insertions, 17 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 677d964ceb..58e45834ef 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)
143#else 143#else
144 /* fortunately EO_OBJ_POINTER_RETURN* will handle NULL obj_id */ 144 /* fortunately EO_OBJ_POINTER_RETURN* will handle NULL obj_id */
145 if (!obj_id) return EINA_FALSE; 145 if (!obj_id) return EINA_FALSE;
146 oid = ((Eo_Header *) obj_id)->id; 146 oid = ((Eo_Base *) obj_id)->id;
147#endif 147#endif
148 return (((oid >> REF_TAG_SHIFT) & 0x1) == 0x0); 148 return (((oid >> REF_TAG_SHIFT) & 0x1) == 0x0);
149} 149}
@@ -761,9 +761,9 @@ eo_class_new(const Eo_Class_Description *desc, const Eo *parent_id, ...)
761 761
762 _Eo_Class *parent = _eo_class_pointer_get(parent_id); 762 _Eo_Class *parent = _eo_class_pointer_get(parent_id);
763#ifndef HAVE_EO_ID 763#ifndef HAVE_EO_ID
764 if (parent && !EINA_MAGIC_CHECK((Eo_Header *) parent, EO_CLASS_EINA_MAGIC)) 764 if (parent && !EINA_MAGIC_CHECK((Eo_Base *) parent, EO_CLASS_EINA_MAGIC))
765 { 765 {
766 EINA_MAGIC_FAIL((Eo_Header *) parent, EO_CLASS_EINA_MAGIC); 766 EINA_MAGIC_FAIL((Eo_Base *) parent, EO_CLASS_EINA_MAGIC);
767 return NULL; 767 return NULL;
768 } 768 }
769#endif 769#endif
@@ -884,7 +884,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo *parent_id, ...)
884 884
885 klass = calloc(1, _eo_class_sz + extn_sz + mro_sz + mixins_sz); 885 klass = calloc(1, _eo_class_sz + extn_sz + mro_sz + mixins_sz);
886#ifndef HAVE_EO_ID 886#ifndef HAVE_EO_ID
887 EINA_MAGIC_SET((Eo_Header *) klass, EO_CLASS_EINA_MAGIC); 887 EINA_MAGIC_SET((Eo_Base *) klass, EO_CLASS_EINA_MAGIC);
888#endif 888#endif
889 eina_lock_new(&klass->objects.trash_lock); 889 eina_lock_new(&klass->objects.trash_lock);
890 eina_lock_new(&klass->iterators.trash_lock); 890 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, .
1079 obj->klass = klass; 1079 obj->klass = klass;
1080 1080
1081#ifndef HAVE_EO_ID 1081#ifndef HAVE_EO_ID
1082 EINA_MAGIC_SET((Eo_Header *) obj, EO_EINA_MAGIC); 1082 EINA_MAGIC_SET((Eo_Base *) obj, EO_EINA_MAGIC);
1083#endif 1083#endif
1084 Eo_Id obj_id = _eo_id_allocate(obj); 1084 Eo_Id obj_id = _eo_id_allocate(obj);
1085 obj->header.id = obj_id; 1085 obj->header.id = obj_id;
diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h
index a1ac9fedbe..9e79f6f838 100644
--- a/src/lib/eo/eo_private.h
+++ b/src/lib/eo/eo_private.h
@@ -57,7 +57,7 @@ extern int _eo_log_dom;
57typedef uintptr_t Eo_Id; 57typedef 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_Header Eo_Header; 60typedef struct _Eo_Base Eo_Base;
61typedef union _Eo { 61typedef union _Eo {
62 _Eo_Object *obj; 62 _Eo_Object *obj;
63 _Eo_Class *klass; 63 _Eo_Class *klass;
@@ -77,7 +77,7 @@ static inline void _eo_free_ids_tables(void);
77 77
78void _eo_condtor_done(Eo *obj); 78void _eo_condtor_done(Eo *obj);
79 79
80struct _Eo_Header 80struct _Eo_Base
81{ 81{
82#ifndef HAVE_EO_ID 82#ifndef HAVE_EO_ID
83 EINA_MAGIC 83 EINA_MAGIC
@@ -87,7 +87,7 @@ struct _Eo_Header
87 87
88struct _Eo_Object 88struct _Eo_Object
89{ 89{
90 Eo_Header header; 90 Eo_Base header;
91 Eo *parent; 91 Eo *parent;
92 Eina_List *children; 92 Eina_List *children;
93 const _Eo_Class *klass; 93 const _Eo_Class *klass;
@@ -130,7 +130,7 @@ typedef struct
130 130
131struct _Eo_Class 131struct _Eo_Class
132{ 132{
133 Eo_Header header; 133 Eo_Base header;
134 134
135 const _Eo_Class *parent; 135 const _Eo_Class *parent;
136 const Eo_Class_Description *desc; 136 const Eo_Class_Description *desc;
@@ -176,7 +176,7 @@ typedef struct
176} Eo_Xref_Node; 176} Eo_Xref_Node;
177 177
178static inline 178static inline
179Eo *_eo_header_id_get(const Eo_Header *header) 179Eo *_eo_header_id_get(const Eo_Base *header)
180{ 180{
181#ifdef HAVE_EO_ID 181#ifdef HAVE_EO_ID
182 return (Eo *) header->id; 182 return (Eo *) header->id;
@@ -188,13 +188,13 @@ Eo *_eo_header_id_get(const Eo_Header *header)
188static inline 188static inline
189Eo *_eo_class_id_get(const _Eo_Class *klass) 189Eo *_eo_class_id_get(const _Eo_Class *klass)
190{ 190{
191 return _eo_header_id_get((Eo_Header *) klass); 191 return _eo_header_id_get((Eo_Base *) klass);
192} 192}
193 193
194static inline 194static inline
195Eo *_eo_id_get(const Eo *obj) 195Eo *_eo_id_get(const Eo *obj)
196{ 196{
197 return _eo_header_id_get((Eo_Header *) obj); 197 return _eo_header_id_get((Eo_Base *) obj);
198} 198}
199 199
200static inline void 200static inline void
diff --git a/src/lib/eo/eo_ptr_indirection.h b/src/lib/eo/eo_ptr_indirection.h
index 3e7dc2891e..99787018b4 100644
--- a/src/lib/eo/eo_ptr_indirection.h
+++ b/src/lib/eo/eo_ptr_indirection.h
@@ -42,28 +42,28 @@
42 _Eo_Object *obj; \ 42 _Eo_Object *obj; \
43 do { \ 43 do { \
44 obj = _eo_obj_pointer_get((Eo_Id)obj_id); \ 44 obj = _eo_obj_pointer_get((Eo_Id)obj_id); \
45 EO_MAGIC_RETURN_VAL((Eo_Header *) obj, EO_EINA_MAGIC, ret); \ 45 EO_MAGIC_RETURN_VAL((Eo_Base *) obj, EO_EINA_MAGIC, ret); \
46 } while (0) 46 } while (0)
47 47
48#define EO_OBJ_POINTER_RETURN(obj_id, obj) \ 48#define EO_OBJ_POINTER_RETURN(obj_id, obj) \
49 _Eo_Object *obj; \ 49 _Eo_Object *obj; \
50 do { \ 50 do { \
51 obj = _eo_obj_pointer_get((Eo_Id)obj_id); \ 51 obj = _eo_obj_pointer_get((Eo_Id)obj_id); \
52 EO_MAGIC_RETURN((Eo_Header *) obj, EO_EINA_MAGIC); \ 52 EO_MAGIC_RETURN((Eo_Base *) obj, EO_EINA_MAGIC); \
53 } while (0) 53 } while (0)
54 54
55#define EO_CLASS_POINTER_RETURN_VAL(klass_id, klass, ret) \ 55#define EO_CLASS_POINTER_RETURN_VAL(klass_id, klass, ret) \
56 _Eo_Class *klass; \ 56 _Eo_Class *klass; \
57 do { \ 57 do { \
58 klass = _eo_class_pointer_get(klass_id); \ 58 klass = _eo_class_pointer_get(klass_id); \
59 EO_MAGIC_RETURN_VAL((Eo_Header *) klass, EO_CLASS_EINA_MAGIC, ret); \ 59 EO_MAGIC_RETURN_VAL((Eo_Base *) klass, EO_CLASS_EINA_MAGIC, ret); \
60 } while (0) 60 } while (0)
61 61
62#define EO_CLASS_POINTER_RETURN(klass_id, klass) \ 62#define EO_CLASS_POINTER_RETURN(klass_id, klass) \
63 _Eo_Class *klass; \ 63 _Eo_Class *klass; \
64 do { \ 64 do { \
65 klass = _eo_class_pointer_get(klass_id); \ 65 klass = _eo_class_pointer_get(klass_id); \
66 EO_MAGIC_RETURN((Eo_Header *) klass, EO_CLASS_EINA_MAGIC); \ 66 EO_MAGIC_RETURN((Eo_Base *) klass, EO_CLASS_EINA_MAGIC); \
67 } while (0) 67 } while (0)
68 68
69#endif 69#endif
diff --git a/src/lib/eo/eo_ptr_indirection.x b/src/lib/eo/eo_ptr_indirection.x
index bd1dcb1621..9bfd584518 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)
454 454
455 ERR("obj_id %p is not pointing to a valid object. Maybe it has already been freed.", (void *)obj_id); 455 ERR("obj_id %p is not pointing to a valid object. Maybe it has already been freed.", (void *)obj_id);
456#else 456#else
457 EINA_MAGIC_SET((Eo_Header *) obj_id, EO_FREED_EINA_MAGIC); 457 EINA_MAGIC_SET((Eo_Base *) obj_id, EO_FREED_EINA_MAGIC);
458#endif 458#endif
459} 459}
460 460