summaryrefslogtreecommitdiff
path: root/src/benchmarks/eo/class_simple.c
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-04-23 11:23:39 +0300
committerDaniel Zaoui <daniel.zaoui@samsung.com>2014-04-23 11:23:39 +0300
commit3c61dc1dba323e23acba623be778dae29ee7e505 (patch)
treee8baa1046eedbc7d067016de335b4c4f381ef5c1 /src/benchmarks/eo/class_simple.c
parent026d7210c6764fd1bca6169484f24cbbea511712 (diff)
Eo: adapt benchmarks to Eo2.
Diffstat (limited to 'src/benchmarks/eo/class_simple.c')
-rw-r--r--src/benchmarks/eo/class_simple.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/src/benchmarks/eo/class_simple.c b/src/benchmarks/eo/class_simple.c
index 05d025ec97..ad5e631524 100644
--- a/src/benchmarks/eo/class_simple.c
+++ b/src/benchmarks/eo/class_simple.c
@@ -7,42 +7,28 @@
7 7
8#define MY_CLASS SIMPLE_CLASS 8#define MY_CLASS SIMPLE_CLASS
9 9
10EAPI Eo_Op SIMPLE_BASE_ID = 0;
11
12static void 10static void
13_a_set(Eo *obj EINA_UNUSED, void *class_data, va_list *list) 11_a_set(Eo *obj EINA_UNUSED, void *class_data, int a)
14{ 12{
15 Simple_Public_Data *pd = class_data; 13 Simple_Public_Data *pd = class_data;
16 int a;
17 a = va_arg(*list, int);
18
19 pd->a = a; 14 pd->a = a;
20} 15}
21 16
22static void 17EAPI EO_VOID_FUNC_BODYV(simple_a_set, EO_FUNC_CALL(a), int a);
23_class_constructor(Eo_Class *klass)
24{
25 const Eo_Op_Func_Description func_desc[] = {
26 EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set),
27 EO_OP_FUNC_SENTINEL
28 };
29 18
30 eo_class_funcs_set(klass, func_desc); 19static Eo_Op_Description op_desc[] = {
31} 20 EO_OP_FUNC(simple_a_set, _a_set, "Set property A"),
32 21 EO_OP_SENTINEL
33static const Eo_Op_Description op_desc[] = {
34 EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "Set property A"),
35 EO_OP_DESCRIPTION_SENTINEL
36}; 22};
37 23
38static const Eo_Class_Description class_desc = { 24static const Eo_Class_Description class_desc = {
39 EO_VERSION, 25 EO_VERSION,
40 "Simple", 26 "Simple",
41 EO_CLASS_TYPE_REGULAR, 27 EO_CLASS_TYPE_REGULAR,
42 EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST), 28 EO_CLASS_DESCRIPTION_OPS(op_desc),
43 NULL, 29 NULL,
44 sizeof(Simple_Public_Data), 30 sizeof(Simple_Public_Data),
45 _class_constructor, 31 NULL,
46 NULL 32 NULL
47}; 33};
48 34