eo: add union _Eo to unify objects and classes internal pointers
authorJérémy Zurcher <jeremy@asynk.ch>
Thu, 26 Sep 2013 21:33:19 +0000 (23:33 +0200)
committerTom Hacohen <tom@stosb.com>
Fri, 27 Sep 2013 13:01:46 +0000 (14:01 +0100)
src/lib/eo/eo_private.h

index fa61526..1d54756 100644 (file)
@@ -58,6 +58,10 @@ typedef uintptr_t Eo_Id;
 typedef struct _Eo_Class _Eo_Class;
 typedef struct _Eo_Object _Eo_Object;
 typedef struct _Eo_Handle _Eo_Handle;
+typedef union _Eo {
+     _Eo_Object *obj;
+     _Eo_Class  *klass;
+} _Eo;
 
 /* Retrieves the pointer to the object from the id */
 static inline _Eo_Object *_eo_obj_pointer_get(const Eo_Id obj_id);