eo: add before and after macro hooks for API generation functions

Add two parameters for macros that generate API functions in Eo so
that the generation can be customized with macros used by Eolian.

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
This commit is contained in:
Felipe Magno de Almeida 2016-03-11 17:22:59 -03:00 committed by Cedric Bail
parent c9347b1ca2
commit 944e11559c
21 changed files with 139 additions and 129 deletions

View File

@ -511,7 +511,7 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
Eina_Bool ret_is_void = (!rettype || !strcmp(rettype, "void"));
_class_func_env_create(class, eolian_function_name_get(funcid), ftype, &func_env);
eina_strbuf_append_printf(eo_func_decl,
"EOAPI EO_%sFUNC_BODY%s%s(%s",
"EOAPI EO_%sFUNC_BODY%s%s(%s, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK",
ret_is_void?"VOID_":"", has_params?"V":"",
(ftype == EOLIAN_PROP_GET ||
eolian_function_object_is_const(funcid) ||

View File

@ -30,7 +30,7 @@ Eo_Class const* create_class(eina::index_sequence<S...>);
/// @param this_ The <em>user data</em> to be passed to the resolved function.
/// @param args An heterogeneous sequence of arguments.
///
inline EO_VOID_FUNC_BODYV(inherit_constructor, EO_FUNC_CALL(this_), void* this_);
inline EO_VOID_FUNC_BODYV(inherit_constructor, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(this_), void* this_);
}

View File

@ -515,60 +515,70 @@ typedef struct _Eo_Call_Cache
__FILE__, __LINE__)) return DefRet; \
_Eo_##Name##_func _func_ = (_Eo_##Name##_func) ___call.func; \
#define _EO_EMPTY_HOOK()
// to define an EAPI function
#define _EO_FUNC_BODY(Name, ObjType, Ret, DefRet) \
#define _EO_FUNC_BODY(Name, ObjType, BeforeHook, AfterHook, Ret, DefRet) \
Ret \
Name(ObjType obj) \
{ \
typedef Ret (*_Eo_##Name##_func)(Eo *, void *obj_data); \
Ret _r; \
EO_FUNC_COMMON_OP(obj, Name, DefRet); \
BeforeHook() \
_r = _func_(___call.eo_id, ___call.data); \
_eo_call_end(&___call); \
AfterHook() \
return _r; \
}
#define _EO_VOID_FUNC_BODY(Name, ObjType) \
#define _EO_VOID_FUNC_BODY(Name, ObjType, BeforeHook, AfterHook) \
void \
Name(ObjType obj) \
{ \
typedef void (*_Eo_##Name##_func)(Eo *, void *obj_data); \
EO_FUNC_COMMON_OP(obj, Name, ); \
BeforeHook() \
_func_(___call.eo_id, ___call.data); \
_eo_call_end(&___call); \
_eo_call_end(&___call); \
AfterHook() \
}
#define _EO_FUNC_BODYV(Name, ObjType, Ret, DefRet, Arguments, ...) \
#define _EO_FUNC_BODYV(Name, ObjType, BeforeHook, AfterHook, Ret, DefRet, Arguments, ...) \
Ret \
Name(ObjType obj, __VA_ARGS__) \
{ \
typedef Ret (*_Eo_##Name##_func)(Eo *, void *obj_data, __VA_ARGS__); \
Ret _r; \
EO_FUNC_COMMON_OP(obj, Name, DefRet); \
BeforeHook() \
_r = _func_(___call.eo_id, ___call.data, Arguments); \
_eo_call_end(&___call); \
AfterHook() \
return _r; \
}
#define _EO_VOID_FUNC_BODYV(Name, ObjType, Arguments, ...) \
#define _EO_VOID_FUNC_BODYV(Name, ObjType, BeforeHook, AfterHook, Arguments, ...) \
void \
Name(ObjType obj, __VA_ARGS__) \
{ \
typedef void (*_Eo_##Name##_func)(Eo *, void *obj_data, __VA_ARGS__); \
EO_FUNC_COMMON_OP(obj, Name, ); \
BeforeHook() \
_func_(___call.eo_id, ___call.data, Arguments); \
_eo_call_end(&___call); \
AfterHook() \
}
#define EO_FUNC_BODY(Name, Ret, DefRet) _EO_FUNC_BODY(Name, Eo *, Ret, DefRet)
#define EO_VOID_FUNC_BODY(Name) _EO_VOID_FUNC_BODY(Name, Eo *)
#define EO_FUNC_BODYV(Name, Ret, DefRet, Arguments, ...) _EO_FUNC_BODYV(Name, Eo *, Ret, DefRet, EO_FUNC_CALL(Arguments), __VA_ARGS__)
#define EO_VOID_FUNC_BODYV(Name, Arguments, ...) _EO_VOID_FUNC_BODYV(Name, Eo *, EO_FUNC_CALL(Arguments), __VA_ARGS__)
#define EO_FUNC_BODY(Name, BeforeHook, AfterHook, Ret, DefRet) _EO_FUNC_BODY(Name, Eo *, BeforeHook, AfterHook, Ret, DefRet)
#define EO_VOID_FUNC_BODY(Name, BeforeHook, AfterHook) _EO_VOID_FUNC_BODY(Name, Eo *, BeforeHook, AfterHook)
#define EO_FUNC_BODYV(Name, BeforeHook, AfterHook, Ret, DefRet, Arguments, ...) _EO_FUNC_BODYV(Name, Eo *, BeforeHook, AfterHook, Ret, DefRet, EO_FUNC_CALL(Arguments), __VA_ARGS__)
#define EO_VOID_FUNC_BODYV(Name, BeforeHook, AfterHook, Arguments, ...) _EO_VOID_FUNC_BODYV(Name, Eo *, BeforeHook, AfterHook, EO_FUNC_CALL(Arguments), __VA_ARGS__)
#define EO_FUNC_BODY_CONST(Name, Ret, DefRet) _EO_FUNC_BODY(Name, const Eo *, Ret, DefRet)
#define EO_VOID_FUNC_BODY_CONST(Name) _EO_VOID_FUNC_BODY(Name, const Eo *)
#define EO_FUNC_BODYV_CONST(Name, Ret, DefRet, Arguments, ...) _EO_FUNC_BODYV(Name, const Eo *, Ret, DefRet, EO_FUNC_CALL(Arguments), __VA_ARGS__)
#define EO_VOID_FUNC_BODYV_CONST(Name, Arguments, ...) _EO_VOID_FUNC_BODYV(Name, const Eo *, EO_FUNC_CALL(Arguments), __VA_ARGS__)
#define EO_FUNC_BODY_CONST(Name, BeforeHook, AfterHook, Ret, DefRet) _EO_FUNC_BODY(Name, const Eo *, BeforeHook, AfterHook, Ret, DefRet)
#define EO_VOID_FUNC_BODY_CONST(Name, BeforeHook, AfterHook) _EO_VOID_FUNC_BODY(Name, const Eo *, BeforeHook, AfterHook)
#define EO_FUNC_BODYV_CONST(Name, BeforeHook, AfterHook, Ret, DefRet, Arguments, ...) _EO_FUNC_BODYV(Name, const Eo *, BeforeHook, AfterHook, Ret, DefRet, EO_FUNC_CALL(Arguments), __VA_ARGS__)
#define EO_VOID_FUNC_BODYV_CONST(Name, BeforeHook, AfterHook, Arguments, ...) _EO_VOID_FUNC_BODYV(Name, const Eo *, BeforeHook, AfterHook, EO_FUNC_CALL(Arguments), __VA_ARGS__)
#ifndef _WIN32
# define _EO_OP_API_ENTRY(a) (void*)a

View File

@ -16,7 +16,7 @@ _prot_print(Eo *obj, void *class_data EINA_UNUSED)
printf("%s %d\n", __func__, pd->protected_x1);
}
EAPI EO_VOID_FUNC_BODY(inherit_prot_print);
EAPI EO_VOID_FUNC_BODY(inherit_prot_print, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK);
static Eo_Op_Description op_descs[] = {
EO_OP_FUNC(inherit_prot_print, _prot_print),

View File

@ -30,7 +30,7 @@ _a_set(Eo *obj, void *class_data, int a)
eo_event_callback_call(obj, EV_A_CHANGED, &pd->a);
}
EAPI EO_VOID_FUNC_BODYV(simple_a_set, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
static Eo_Op_Description op_descs[] = {
EO_OP_FUNC(simple_a_set, _a_set),

View File

@ -27,73 +27,73 @@ _a_get(Eo *obj EINA_UNUSED, void *class_data)
return pd->a;
}
EAPI EO_VOID_FUNC_BODYV(simple_a_set, EO_FUNC_CALL(a), int a);
EAPI EO_FUNC_BODY(simple_a_get, int, 0);
EAPI EO_VOID_FUNC_BODYV(simple_a_set, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_FUNC_BODY(simple_a_get, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, int, 0);
EAPI EO_VOID_FUNC_BODYV(simple_a_set1, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set2, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set3, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set4, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set5, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set6, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set7, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set8, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set9, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set10, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set11, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set12, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set13, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set14, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set15, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set16, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set17, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set18, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set19, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set20, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set21, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set22, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set23, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set24, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set25, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set26, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set27, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set28, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set29, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set30, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set31, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set32, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get1, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get2, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get3, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get4, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get5, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get6, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get7, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get8, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get9, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get10, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get11, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get12, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get13, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get14, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get15, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get16, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get17, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get18, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get19, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get20, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get21, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get22, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get23, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get24, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get25, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get26, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get27, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get28, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get29, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get30, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get31, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get32, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set1, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set2, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set3, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set4, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set5, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set6, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set7, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set8, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set9, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set10, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set11, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set12, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set13, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set14, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set15, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set16, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set17, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set18, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set19, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set20, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set21, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set22, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set23, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set24, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set25, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set26, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set27, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set28, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set29, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set30, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set31, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set32, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get1, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get2, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get3, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get4, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get5, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get6, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get7, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get8, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get9, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get10, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get11, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get12, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get13, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get14, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get15, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get16, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get17, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get18, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get19, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get20, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get21, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get22, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get23, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get24, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get25, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get26, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get27, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get28, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get29, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get30, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get31, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_get32, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
/* XXX: This is fragile, and emulates many IDs in order to go to the next
* op id chain (assuming chain size is as it is at the moment, 32).

View File

@ -35,7 +35,7 @@ _destructor(Eo *obj, void *class_data EINA_UNUSED)
my_init_count--;
}
EAPI EO_VOID_FUNC_BODYV(mixin_add_and_print, EO_FUNC_CALL(x), int x);
EAPI EO_VOID_FUNC_BODYV(mixin_add_and_print, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(x), int x);
static Eo_Op_Description op_descs[] = {
EO_OP_FUNC(mixin_add_and_print, _add_and_print_set),

View File

@ -31,8 +31,8 @@ _##name##_set(Eo *obj EINA_UNUSED, void *class_data, int name) \
pd->name = name; \
printf("%s %d\n", __func__, pd->name); \
} \
EO_VOID_FUNC_BODYV(simple_##name##_set, EO_FUNC_CALL(name), int name); \
EO_FUNC_BODY(simple_##name##_get, int, 0);
EO_VOID_FUNC_BODYV(simple_##name##_set, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(name), int name); \
EO_FUNC_BODY(simple_##name##_get, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, int, 0);
_GET_SET_FUNC(a)
_GET_SET_FUNC(b)
@ -83,7 +83,7 @@ _class_destructor(Eo_Class *klass EINA_UNUSED)
free(class_var);
}
EO_VOID_FUNC_BODYV(simple_constructor, EO_FUNC_CALL(a), int a);
EO_VOID_FUNC_BODYV(simple_constructor, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
static Eo_Op_Description op_descs[] = {
EO_OP_FUNC_OVERRIDE(eo_constructor, _constructor),

View File

@ -56,8 +56,8 @@ _class_print(Eo_Class *klass, void *data EINA_UNUSED)
return EINA_TRUE;
}
EAPI EO_FUNC_BODY(inherit2_print, Eina_Bool, EINA_FALSE);
EAPI EO_FUNC_BODY(inherit2_print2, Eina_Bool, EINA_FALSE);
EAPI EO_FUNC_BODY(inherit2_print, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, Eina_Bool, EINA_FALSE);
EAPI EO_FUNC_BODY(inherit2_print2, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, Eina_Bool, EINA_FALSE);
static Eo_Op_Description op_descs[] = {
EO_OP_FUNC(inherit2_print, _print),

View File

@ -51,10 +51,10 @@ _class_print2(Eo_Class *klass, void *class_data EINA_UNUSED)
return EINA_TRUE;
}
EAPI EO_VOID_FUNC_BODYV(simple_a_set, EO_FUNC_CALL(a), int a);
EAPI EO_FUNC_BODY(simple_a_print, Eina_Bool, EINA_FALSE);
EAPI EO_FUNC_BODY_CONST(simple_class_print, Eina_Bool, EINA_FALSE);
EAPI EO_FUNC_BODY_CONST(simple_class_print2, Eina_Bool, EINA_FALSE);
EAPI EO_VOID_FUNC_BODYV(simple_a_set, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EAPI EO_FUNC_BODY(simple_a_print, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, Eina_Bool, EINA_FALSE);
EAPI EO_FUNC_BODY_CONST(simple_class_print, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, Eina_Bool, EINA_FALSE);
EAPI EO_FUNC_BODY_CONST(simple_class_print2, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, Eina_Bool, EINA_FALSE);
static Eo_Op_Description op_descs[] = {
EO_OP_FUNC(simple_a_set, _a_set),

View File

@ -8,7 +8,7 @@
#define MY_CLASS INTERFACE_CLASS
EO_FUNC_BODY(interface_ab_sum_get, int, 0);
EO_FUNC_BODY(interface_ab_sum_get, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, int, 0);
static Eo_Op_Description op_descs[] = {
EO_OP_FUNC(interface_ab_sum_get, NULL),

View File

@ -9,7 +9,7 @@
#define MY_CLASS INTERFACE2_CLASS
EO_FUNC_BODY(interface2_ab_sum_get2, int, 0);
EO_FUNC_BODY(interface2_ab_sum_get2, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, int, 0);
static Eo_Op_Description op_descs[] = {
EO_OP_FUNC(interface2_ab_sum_get2, NULL),

View File

@ -30,8 +30,8 @@ _##name##_set(Eo *obj EINA_UNUSED, void *class_data, int name) \
pd->name = name; \
printf("%s %d\n", __func__, pd->name); \
} \
EO_VOID_FUNC_BODYV(simple_##name##_set, EO_FUNC_CALL(name), int name); \
EO_FUNC_BODY(simple_##name##_get, int, 0);
EO_VOID_FUNC_BODYV(simple_##name##_set, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(name), int name); \
EO_FUNC_BODY(simple_##name##_get, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, int, 0);
_GET_SET_FUNC(a)
_GET_SET_FUNC(b)

View File

@ -30,7 +30,7 @@ _destructor(Eo *obj, void *class_data EINA_UNUSED)
eo_destructor(eo_super(obj, MY_CLASS));
}
EAPI EO_FUNC_BODY(mixin_ab_sum_get, int, 0);
EAPI EO_FUNC_BODY(mixin_ab_sum_get, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, int, 0);
static Eo_Op_Description op_descs[] = {
EO_OP_FUNC_OVERRIDE(eo_constructor, _constructor),

View File

@ -31,8 +31,8 @@ _##name##_set(Eo *obj EINA_UNUSED, void *class_data, int name) \
pd->name = name; \
printf("%s %d\n", __func__, pd->name); \
} \
EO_VOID_FUNC_BODYV(simple_##name##_set, EO_FUNC_CALL(name), int name); \
EO_FUNC_BODY(simple_##name##_get, int, 0);
EO_VOID_FUNC_BODYV(simple_##name##_set, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(name), int name); \
EO_FUNC_BODY(simple_##name##_get, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, int, 0);
_GET_SET_FUNC(a)
_GET_SET_FUNC(b)

View File

@ -69,7 +69,7 @@ _constructor(Eo *obj, void *class_data EINA_UNUSED)
return obj;
}
EAPI EO_VOID_FUNC_BODYV(simple_a_set, EO_FUNC_CALL(a), int a);
EAPI EO_VOID_FUNC_BODYV(simple_a_set, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
static Eo_Op_Description op_descs[] = {
EO_OP_FUNC_OVERRIDE(eo_constructor, _constructor),

View File

@ -48,7 +48,7 @@ _class_hi_print(Eo_Class *klass, void *data EINA_UNUSED)
return EINA_TRUE;
}
EO_FUNC_BODYV(simple_part_get, Eo *, NULL, EO_FUNC_CALL(name), const char *name);
EO_FUNC_BODYV(simple_part_get, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, Eo *, NULL, EO_FUNC_CALL(name), const char *name);
static Eo *
_part_get(Eo *obj, void *class_data EINA_UNUSED, const char *name EINA_UNUSED)
@ -57,7 +57,7 @@ _part_get(Eo *obj, void *class_data EINA_UNUSED, const char *name EINA_UNUSED)
return eo_add(SIMPLE_CLASS, obj);
}
EO_VOID_FUNC_BODYV(simple_recursive, EO_FUNC_CALL(n), int n);
EO_VOID_FUNC_BODYV(simple_recursive, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(n), int n);
static void
_recursive(Eo *obj, void *class_data EINA_UNUSED, int n)
@ -81,12 +81,12 @@ _dbg_info_get(Eo *eo_obj, void *_pd EINA_UNUSED, Eo_Dbg_Info *root)
EO_DBG_INFO_APPEND(group, "Test", EINA_VALUE_TYPE_INT, 8);
}
EO_VOID_FUNC_BODYV(simple_a_set, EO_FUNC_CALL(a), int a);
EO_FUNC_BODY(simple_a_get, int, 0);
EO_FUNC_BODY(simple_a_print, Eina_Bool, EINA_FALSE);
EO_FUNC_BODY_CONST(simple_class_hi_print, Eina_Bool, EINA_FALSE);
EO_VOID_FUNC_BODY(simple_pure_virtual);
EO_VOID_FUNC_BODY(simple_no_implementation);
EO_VOID_FUNC_BODYV(simple_a_set, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(a), int a);
EO_FUNC_BODY(simple_a_get, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, int, 0);
EO_FUNC_BODY(simple_a_print, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, Eina_Bool, EINA_FALSE);
EO_FUNC_BODY_CONST(simple_class_hi_print, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, Eina_Bool, EINA_FALSE);
EO_VOID_FUNC_BODY(simple_pure_virtual, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK);
EO_VOID_FUNC_BODY(simple_no_implementation, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK);
static Eo_Op_Description op_descs[] = {
EO_OP_FUNC(simple_a_set, _a_set),
@ -119,7 +119,7 @@ _beef_get(Eo *obj EINA_UNUSED, void *class_data EINA_UNUSED)
return 0xBEEF;
}
EO_FUNC_BODY_CONST(simple2_class_beef_get, int, 0);
EO_FUNC_BODY_CONST(simple2_class_beef_get, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, int, 0);
static Eo_Op_Description op_descs2[] = {
EO_OP_CLASS_FUNC(simple2_class_beef_get, _beef_get),

View File

@ -742,8 +742,8 @@ _class_hi_print(Eo_Class *klass EINA_UNUSED, void *class_data EINA_UNUSED)
return EINA_TRUE;
}
EO_FUNC_BODY(multi_a_print, Eina_Bool, EINA_FALSE);
EO_FUNC_BODY_CONST(multi_class_hi_print, Eina_Bool, EINA_FALSE);
EO_FUNC_BODY(multi_a_print, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, Eina_Bool, EINA_FALSE);
EO_FUNC_BODY_CONST(multi_class_hi_print, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, Eina_Bool, EINA_FALSE);
static Eo_Op_Description _multi_do_op_descs[] = {
EO_OP_FUNC(multi_a_print, _a_print),

View File

@ -20,9 +20,9 @@ typedef struct
#define THREAD_TEST_CLASS thread_test_class_get()
const Eo_Class *thread_test_class_get(void);
EO_FUNC_BODY(thread_test_v_get, int, 0);
EO_VOID_FUNC_BODY(thread_test_try_swap_stack);
EO_VOID_FUNC_BODYV(thread_test_constructor, EO_FUNC_CALL(v), int v);
EO_FUNC_BODY(thread_test_v_get, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, int, 0);
EO_VOID_FUNC_BODY(thread_test_try_swap_stack, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK);
EO_VOID_FUNC_BODYV(thread_test_constructor, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(v), int v);
static int
_v_get(Eo *obj EINA_UNUSED, void *class_data)

View File

@ -1,15 +1,15 @@
Eina_Bool _class_simple_a_set(Eo *obj, Evas_Simple_Data *pd, int value);
EOAPI EO_FUNC_BODYV(evas_obj_simple_a_set, Eina_Bool, EINA_TRUE, EO_FUNC_CALL(value), int value);
EOAPI EO_FUNC_BODYV(evas_obj_simple_a_set, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, Eina_Bool, EINA_TRUE, EO_FUNC_CALL(value), int value);
int _class_simple_a_get(Eo *obj, Evas_Simple_Data *pd);
EOAPI EO_FUNC_BODY_CONST(evas_obj_simple_a_get, int, 100);
EOAPI EO_FUNC_BODY_CONST(evas_obj_simple_a_get, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, int, 100);
void _class_simple_b_set(Eo *obj, Evas_Simple_Data *pd);
EOAPI EO_VOID_FUNC_BODY(evas_obj_simple_b_set);
EOAPI EO_VOID_FUNC_BODY(evas_obj_simple_b_set, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK);
char * _class_simple_foo(Eo *obj, Evas_Simple_Data *pd, int a, char *b, double *c);
@ -19,11 +19,11 @@ static char * __eolian_class_simple_foo(Eo *obj, Evas_Simple_Data *pd, int a, ch
return _class_simple_foo(obj, pd, a, b, c);
}
EOAPI EO_FUNC_BODYV(evas_obj_simple_foo, char *, NULL, EO_FUNC_CALL(a, b, c), int a, char *b, double *c);
EOAPI EO_FUNC_BODYV(evas_obj_simple_foo, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, char *, NULL, EO_FUNC_CALL(a, b, c), int a, char *b, double *c);
int _class_simple_bar(Eo *obj, Evas_Simple_Data *pd, int x);
EOAPI EO_FUNC_BODYV(evas_obj_simple_bar, int, 0, EO_FUNC_CALL(x), int x);
EOAPI EO_FUNC_BODYV(evas_obj_simple_bar, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, int, 0, EO_FUNC_CALL(x), int x);
static const Eo_Op_Description _class_simple_op_desc[] = {
EO_OP_FUNC(evas_obj_simple_a_set, _class_simple_a_set),

View File

@ -1,5 +1,5 @@
EOAPI EO_VOID_FUNC_BODY(override_a_set);
EOAPI EO_VOID_FUNC_BODY(override_foo);
EOAPI EO_VOID_FUNC_BODY(override_a_set, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK);
EOAPI EO_VOID_FUNC_BODY(override_foo, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK);
static void __eolian_override_b_set(Eo *obj EINA_UNUSED, Override_Data *pd, int idx EINA_UNUSED, float a, char b, int c)
{
@ -8,7 +8,7 @@ static void __eolian_override_b_set(Eo *obj EINA_UNUSED, Override_Data *pd, int
c = pd->c;
}
EOAPI EO_VOID_FUNC_BODYV(override_b_set, EO_FUNC_CALL(idx, a, b, c), int idx, float a, char b, int c);
EOAPI EO_VOID_FUNC_BODYV(override_b_set, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(idx, a, b, c), int idx, float a, char b, int c);
static void __eolian_override_bar(Eo *obj EINA_UNUSED, Override_Data *pd EINA_UNUSED, int idx EINA_UNUSED, int *a, char **str)
{
@ -16,26 +16,26 @@ static void __eolian_override_bar(Eo *obj EINA_UNUSED, Override_Data *pd EINA_UN
if (str) *str = NULL;
}
EOAPI EO_VOID_FUNC_BODYV(override_bar, EO_FUNC_CALL(idx, a, str), int idx, int *a, char **str);
EOAPI EO_VOID_FUNC_BODYV(override_bar, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(idx, a, str), int idx, int *a, char **str);
static int __eolian_override_c_get(Eo *obj EINA_UNUSED, Override_Data *pd EINA_UNUSED, int idx EINA_UNUSED)
{
return 50;
}
EOAPI EO_FUNC_BODYV_CONST(override_c_get, int, 50, EO_FUNC_CALL(idx), int idx);
EOAPI EO_FUNC_BODYV_CONST(override_c_get, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, int, 50, EO_FUNC_CALL(idx), int idx);
void _override_a_get(Eo *obj, Override_Data *pd);
EOAPI EO_VOID_FUNC_BODY_CONST(override_a_get);
EOAPI EO_VOID_FUNC_BODY_CONST(override_a_get, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK);
void _override_b_get(Eo *obj, Override_Data *pd, int idx, float *a, char *b, int *c);
EOAPI EO_VOID_FUNC_BODYV_CONST(override_b_get, EO_FUNC_CALL(idx, a, b, c), int idx, float *a, char *b, int *c);
EOAPI EO_VOID_FUNC_BODYV_CONST(override_b_get, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(idx, a, b, c), int idx, float *a, char *b, int *c);
void _override_c_set(Eo *obj, Override_Data *pd, int idx, int c);
EOAPI EO_VOID_FUNC_BODYV(override_c_set, EO_FUNC_CALL(idx, c), int idx, int c);
EOAPI EO_VOID_FUNC_BODYV(override_c_set, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(idx, c), int idx, int c);
void _override_base_constructor(Eo *obj, Override_Data *pd);
@ -78,4 +78,4 @@ static const Eo_Class_Description _override_class_desc = {
NULL
};
EO_DEFINE_CLASS(override_class_get, &_override_class_desc, BASE_CLASS, NULL);
EO_DEFINE_CLASS(override_class_get, &_override_class_desc, BASE_CLASS, NULL);