tasn pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=75c981a9d9e639d5646024700c8df2c13677f445
commit 75c981a9d9e639d5646024700c8df2c13677f445 Author: Tom Hacohen <t...@stosb.com> Date: Tue Sep 6 13:57:55 2016 +0100 Eo benchmarks: Fix according to recent Eo changes. Thanks to Stefan for the report. --- src/benchmarks/eo/class_simple.c | 16 +++++++++++----- src/benchmarks/eo/eo_bench_eo_do.c | 14 ++++++++++---- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/benchmarks/eo/class_simple.c b/src/benchmarks/eo/class_simple.c index d37e3a1..75f8eb0 100644 --- a/src/benchmarks/eo/class_simple.c +++ b/src/benchmarks/eo/class_simple.c @@ -30,17 +30,23 @@ _a_set(Eo *obj EINA_UNUSED, void *class_data, int a) EAPI EFL_VOID_FUNC_BODYV(simple_a_set, EFL_FUNC_CALL(a), int a); -static Efl_Op_Description op_desc[] = { - EFL_OBJECT_OP_FUNC(simple_a_set, _a_set), - EFL_OBJECT_OP_FUNC(simple_other_call, _other_call), -}; +static Eina_Bool +_class_initializer(Efl_Class *klass) +{ + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(simple_a_set, _a_set), + EFL_OBJECT_OP_FUNC(simple_other_call, _other_call), + ); + + return efl_class_functions_set(klass, &ops); +} static const Efl_Class_Description class_desc = { EO_VERSION, "Simple", EFL_CLASS_TYPE_REGULAR, - EFL_CLASS_DESCRIPTION_OPS(op_desc), sizeof(Simple_Public_Data), + _class_initializer, NULL, NULL }; diff --git a/src/benchmarks/eo/eo_bench_eo_do.c b/src/benchmarks/eo/eo_bench_eo_do.c index 1f75119..0666580 100644 --- a/src/benchmarks/eo/eo_bench_eo_do.c +++ b/src/benchmarks/eo/eo_bench_eo_do.c @@ -58,9 +58,15 @@ _a_set(Eo *obj, void *class_data EINA_UNUSED, int a) simple_a_set(efl_super(obj, cur_klass), a); } -static Efl_Op_Description op_desc[] = { - EFL_OBJECT_OP_FUNC_OVERRIDE(simple_a_set, _a_set), -}; +static Eina_Bool +_class_initializer(Efl_Class *klass) +{ + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC_OVERRIDE(simple_a_set, _a_set), + ); + + return efl_class_functions_set(klass, &ops); +} static void bench_eo_do_super(int request) @@ -69,8 +75,8 @@ bench_eo_do_super(int request) EO_VERSION, "Simple2", EFL_CLASS_TYPE_REGULAR, - EFL_CLASS_DESCRIPTION_OPS(op_desc), 0, + _class_initializer, NULL, NULL }; --