Eo benchmarks: Fix according to recent Eo changes.
authorTom Hacohen <tom@stosb.com>
Tue, 6 Sep 2016 12:57:55 +0000 (13:57 +0100)
committerTom Hacohen <tom@stosb.com>
Tue, 6 Sep 2016 12:58:13 +0000 (13:58 +0100)
Thanks to Stefan for the report.

src/benchmarks/eo/class_simple.c
src/benchmarks/eo/eo_bench_eo_do.c

index d37e3a1..75f8eb0 100644 (file)
@@ -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
 };
index 1f75119..0666580 100644 (file)
@@ -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
    };