From c24775c58d646bd65b31f0632ad8165c6b65db68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 26 Sep 2013 23:33:19 +0200 Subject: [PATCH] eo: add union _Eo to unify objects and classes internal pointers --- src/lib/eo/eo_private.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h index fa61526164..1d547564c2 100644 --- a/src/lib/eo/eo_private.h +++ b/src/lib/eo/eo_private.h @@ -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);