eo: add union _Eo to unify objects and classes internal pointers

This commit is contained in:
Jérémy Zurcher 2013-09-26 23:33:19 +02:00 committed by Tom Hacohen
parent f43287a261
commit c24775c58d
1 changed files with 4 additions and 0 deletions

View 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);