summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-09-27 10:50:06 +0100
committerTom Hacohen <tom@stosb.com>2013-09-27 14:01:47 +0100
commit8dbbc167319dfe95ab5c3cb4dd0d9e14d15bf89e (patch)
tree11ceba6cc1eacb094c055f7e6179d9f3e4fd1bf8
parent2a82ff95e42e261d5a40d1062beff5c482ca7073 (diff)
Eo: Class_Id and Object_Id are now the same type.
-rw-r--r--src/lib/eo/eo.c10
-rw-r--r--src/lib/eo/eo_private.h14
2 files changed, 9 insertions, 15 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 64d8b3cbdf..14c4fdae7f 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -17,7 +17,7 @@ EAPI Eina_Lock _eo_class_creation_lock;
17int _eo_log_dom = -1; 17int _eo_log_dom = -1;
18 18
19static _Eo_Class **_eo_classes; 19static _Eo_Class **_eo_classes;
20static Eo_Class_Id _eo_classes_last_id; 20static Eo_Id _eo_classes_last_id;
21static Eina_Bool _eo_init_count = 0; 21static Eina_Bool _eo_init_count = 0;
22static Eo_Op _eo_ops_last_id = 0; 22static Eo_Op _eo_ops_last_id = 0;
23 23
@@ -151,7 +151,7 @@ static inline _Eo_Class *
151_eo_class_pointer_get(const Eo *klass_id) 151_eo_class_pointer_get(const Eo *klass_id)
152{ 152{
153#ifdef HAVE_EO_ID 153#ifdef HAVE_EO_ID
154 return ID_CLASS_GET((Eo_Class_Id)klass_id); 154 return ID_CLASS_GET((Eo_Id)klass_id);
155#else 155#else
156 return (_Eo_Class *) EO_FROM_HANDLE(klass_id); 156 return (_Eo_Class *) EO_FROM_HANDLE(klass_id);
157#endif 157#endif
@@ -832,11 +832,11 @@ eo_class_new(const Eo_Class_Description *desc, const Eo *parent_id, ...)
832 DBG("Started building extensions list for class '%s'", desc->name); 832 DBG("Started building extensions list for class '%s'", desc->name);
833 extn_list = NULL; 833 extn_list = NULL;
834 const _Eo_Class *extn = NULL; 834 const _Eo_Class *extn = NULL;
835 const Eo_Class_Id *extn_id = NULL; 835 const Eo_Id *extn_id = NULL;
836 836
837 va_start(p_list, parent_id); 837 va_start(p_list, parent_id);
838 838
839 extn_id = va_arg(p_list, Eo_Class_Id *); 839 extn_id = va_arg(p_list, Eo_Id *);
840 while (extn_id) 840 while (extn_id)
841 { 841 {
842 extn = _eo_class_pointer_get((Eo *)extn_id); 842 extn = _eo_class_pointer_get((Eo *)extn_id);
@@ -850,7 +850,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo *parent_id, ...)
850 break; 850 break;
851 } 851 }
852 852
853 extn_id = va_arg(p_list, Eo_Class_Id *); 853 extn_id = va_arg(p_list, Eo_Id *);
854 } 854 }
855 855
856 va_end(p_list); 856 va_end(p_list);
diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h
index 1d547564c2..ca364dda24 100644
--- a/src/lib/eo/eo_private.h
+++ b/src/lib/eo/eo_private.h
@@ -85,6 +85,8 @@ struct _Eo_Object {
85#ifndef HAVE_EO_ID 85#ifndef HAVE_EO_ID
86 EINA_MAGIC 86 EINA_MAGIC
87#endif 87#endif
88 Eo_Id obj_id;
89
88 Eo *parent; 90 Eo *parent;
89 Eina_List *children; 91 Eina_List *children;
90 const _Eo_Class *klass; 92 const _Eo_Class *klass;
@@ -95,8 +97,6 @@ struct _Eo_Object {
95 97
96 Eina_List *composite_objects; 98 Eina_List *composite_objects;
97 99
98 Eo_Id obj_id;
99
100 int refcount; 100 int refcount;
101 int datarefcount; 101 int datarefcount;
102 102
@@ -108,13 +108,6 @@ struct _Eo_Object {
108 Eina_Bool manual_free:1; 108 Eina_Bool manual_free:1;
109}; 109};
110 110
111/**
112 * @typedef Eo_Class_Id
113 * An Id of a class.
114 * @ingroup Eo_Class
115 */
116typedef uintptr_t Eo_Class_Id;
117
118typedef struct _Dich_Chain1 Dich_Chain1; 111typedef struct _Dich_Chain1 Dich_Chain1;
119 112
120typedef struct 113typedef struct
@@ -139,7 +132,8 @@ struct _Eo_Class
139#ifndef HAVE_EO_ID 132#ifndef HAVE_EO_ID
140 EINA_MAGIC 133 EINA_MAGIC
141#endif 134#endif
142 Eo_Class_Id class_id; 135 Eo_Id class_id;
136
143 const _Eo_Class *parent; 137 const _Eo_Class *parent;
144 const Eo_Class_Description *desc; 138 const Eo_Class_Description *desc;
145 Dich_Chain1 *chain; /**< The size is chain size */ 139 Dich_Chain1 *chain; /**< The size is chain size */