From bfa48634cf347e78f4a12d259bbf4520038e2983 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 9 Jul 2013 14:11:05 +0200 Subject: [PATCH] eo2: EO_FUNC -> EO_FUNC_BODY use macro to build the function body, the function prototype is a regular one --- src/lib/eo/Eo.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index 91b4715..19162e6 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -594,9 +594,11 @@ EAPI Eina_Bool eo_shutdown(void); typedef struct _Eo_Internal _Eo; +#define EO_FUNC_CALL(...) func(objid, __VA_ARGS__) + /* XXX: Essential, because we need to adjust objid for comp objects. */ -#define EO_FUNC(Name, Ret, Id, Func, DefRet, ...) \ -Ret \ +#define EO_FUNC_BODY(Name, Ret, Id, Func, DefRet, ...) \ +EAPI Ret \ Name(_Eo *obj, Eo *objid, __VA_ARGS__) \ { \ Ret (*func)(Eo *, __VA_ARGS__) = eo2_func_get(obj, Id(Name)); \ @@ -620,6 +622,7 @@ EAPI void * eo2_func_get_internal(_Eo *obj, const Eo_Class *klass, Eo_Op op); #define eo2_do_end(obj) eo_unref(obj) #define eo2_o _obj_, _objid_ +#define eo2_a _Eo *obj, Eo *objid #define eo2_do(objid, ...) \ do \ -- 2.7.4