summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-09-06 13:57:55 +0100
committerTom Hacohen <tom@stosb.com>2016-09-06 13:58:13 +0100
commit75c981a9d9e639d5646024700c8df2c13677f445 (patch)
tree516078a7974f3e791085237600144a9ea6d1508a
parent689ba2ff6de807f8c416ce75a62070ae34b6e4e0 (diff)
downloadefl-75c981a9d9e639d5646024700c8df2c13677f445.tar.gz
Eo benchmarks: Fix according to recent Eo changes.
Thanks to Stefan for the report.
-rw-r--r--src/benchmarks/eo/class_simple.c16
-rw-r--r--src/benchmarks/eo/eo_bench_eo_do.c14
2 files changed, 21 insertions, 9 deletions
diff --git a/src/benchmarks/eo/class_simple.c b/src/benchmarks/eo/class_simple.c
index d37e3a11ec..75f8eb0636 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 1f75119633..0666580a09 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
};