eo2: pass the object id and data to function call

This commit is contained in:
Tom Hacohen 2013-07-09 15:49:45 +01:00
parent 71341334a9
commit 9e042c0686
1 changed files with 2 additions and 2 deletions

View File

@ -594,14 +594,14 @@ EAPI Eina_Bool eo_shutdown(void);
typedef struct _Eo_Internal _Eo;
#define EO_FUNC_CALL(...) func(obj_data, __VA_ARGS__)
#define EO_FUNC_CALL(...) func(objid, obj_data, __VA_ARGS__)
/* XXX: Essential, because we need to adjust objid for comp objects. */
#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)); \
Ret (*func)(Eo *, void *obj_data, __VA_ARGS__) = eo2_func_get(obj, Id(Name)); \
if (!func) return DefRet; \
void *obj_data = eo2_data_scope_get(obj); \
return Func; \