tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=bd3801247e50ff1cda48af33345a918240d7d315

commit bd3801247e50ff1cda48af33345a918240d7d315
Author: Tom Hacohen <t...@stosb.com>
Date:   Thu Sep 8 13:08:08 2016 +0100

    Eo: Make function overrides implicit.
    
    Before this commit, function overrides were explicit. That is, you'd
    have to explicitly state you were overriding a function instead of
    creating a new one. This made the code a tad more complex, and was also
    a bit more annoying to use. This commit removes this extra piece of
    information.
    
    This means we now store much less information per function, that will
    let us further optimise out structures in the future.
---
 src/benchmarks/eo/eo_bench_eo_do.c                 |  2 +-
 src/bin/elementary/test_ui_box.c                   |  2 +-
 src/bin/elementary/test_ui_grid.c                  |  2 +-
 src/bin/eolian/eo_generator.c                      |  6 ++--
 src/lib/elementary/efl_ui_grid.c                   |  2 +-
 src/lib/eo/Eo.h                                    |  8 ++---
 src/lib/eo/eo.c                                    | 42 +++++++++++-----------
 .../eo/composite_objects/composite_objects_comp.c  |  4 +--
 src/tests/eo/constructors/constructors_mixin.c     |  4 +--
 src/tests/eo/constructors/constructors_simple.c    |  6 ++--
 src/tests/eo/constructors/constructors_simple2.c   |  2 +-
 src/tests/eo/constructors/constructors_simple3.c   |  2 +-
 src/tests/eo/constructors/constructors_simple5.c   |  2 +-
 src/tests/eo/constructors/constructors_simple6.c   |  2 +-
 src/tests/eo/constructors/constructors_simple7.c   |  2 +-
 .../function_overrides_inherit2.c                  |  4 +--
 .../function_overrides_inherit3.c                  |  2 +-
 src/tests/eo/interface/interface_simple.c          |  4 +--
 src/tests/eo/mixin/mixin_inherit.c                 |  2 +-
 src/tests/eo/mixin/mixin_mixin.c                   |  4 +--
 src/tests/eo/mixin/mixin_mixin2.c                  |  6 ++--
 src/tests/eo/mixin/mixin_mixin3.c                  |  6 ++--
 src/tests/eo/signals/signals_simple.c              |  2 +-
 .../eo/suite/eo_test_class_behaviour_errors.c      |  2 +-
 src/tests/eo/suite/eo_test_class_errors.c          | 40 ++-------------------
 src/tests/eo/suite/eo_test_class_simple.c          |  4 +--
 src/tests/eo/suite/eo_test_class_singleton.c       |  2 +-
 src/tests/eo/suite/eo_test_general.c               | 12 +++----
 src/tests/eolian/data/override_ref.c               |  6 ++--
 29 files changed, 74 insertions(+), 110 deletions(-)

diff --git a/src/benchmarks/eo/eo_bench_eo_do.c 
b/src/benchmarks/eo/eo_bench_eo_do.c
index 0666580..d434ab9 100644
--- a/src/benchmarks/eo/eo_bench_eo_do.c
+++ b/src/benchmarks/eo/eo_bench_eo_do.c
@@ -62,7 +62,7 @@ static Eina_Bool
 _class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(simple_a_set, _a_set),
+         EFL_OBJECT_OP_FUNC(simple_a_set, _a_set),
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/bin/elementary/test_ui_box.c b/src/bin/elementary/test_ui_box.c
index 5e918be..99e3e93 100644
--- a/src/bin/elementary/test_ui_box.c
+++ b/src/bin/elementary/test_ui_box.c
@@ -178,7 +178,7 @@ static void
 custom_check_cb(void *data, const Efl_Event *event)
 {
    EFL_OPS_DEFINE(custom_layout_ops,
-                          EFL_OBJECT_OP_FUNC_OVERRIDE(efl_pack_layout_update, 
_custom_layout_update));
+                          EFL_OBJECT_OP_FUNC(efl_pack_layout_update, 
_custom_layout_update));
 
    Eina_Bool chk = elm_check_selected_get(event->object);
    Eo *obj = data;
diff --git a/src/bin/elementary/test_ui_grid.c 
b/src/bin/elementary/test_ui_grid.c
index def80b1..6902b01 100644
--- a/src/bin/elementary/test_ui_grid.c
+++ b/src/bin/elementary/test_ui_grid.c
@@ -23,7 +23,7 @@ static Eina_Bool
 _custom_engine_class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_CLASS_FUNC_OVERRIDE(efl_pack_layout_do, 
_custom_engine_layout_do),
+         EFL_OBJECT_OP_CLASS_FUNC(efl_pack_layout_do, 
_custom_engine_layout_do),
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c
index 35b0593..c76c7b5 100644
--- a/src/bin/eolian/eo_generator.c
+++ b/src/bin/eolian/eo_generator.c
@@ -822,7 +822,7 @@ eo_source_end_generate(const Eolian_Class *class, 
Eina_Strbuf *buf)
               if (ftype != EOLIAN_PROP_GET)
                 {
                    Eina_Stringshare *rets = 
eolian_function_full_c_name_get(fnid, EOLIAN_PROP_SET, EINA_FALSE);
-                   eina_strbuf_append_printf(str_op, "\n      
EFL_OBJECT_OP_%sFUNC_OVERRIDE(%s, %s_%s_set),",
+                   eina_strbuf_append_printf(str_op, "\n      
EFL_OBJECT_OP_%sFUNC(%s, %s_%s_set),",
                          class_str, rets, implname, funcname);
                    eo_bind_func_generate(class, fnid, EOLIAN_PROP_SET, 
str_bodyf, impl_desc, &impl_env);
                    eina_stringshare_del(rets);
@@ -831,7 +831,7 @@ eo_source_end_generate(const Eolian_Class *class, 
Eina_Strbuf *buf)
               if (ftype != EOLIAN_PROP_SET)
                 {
                    Eina_Stringshare *rets = 
eolian_function_full_c_name_get(fnid, EOLIAN_PROP_GET, EINA_FALSE);
-                   eina_strbuf_append_printf(str_op, "\n      
EFL_OBJECT_OP_%sFUNC_OVERRIDE(%s, %s_%s_get),",
+                   eina_strbuf_append_printf(str_op, "\n      
EFL_OBJECT_OP_%sFUNC(%s, %s_%s_get),",
                          class_str, rets, implname, funcname);
                    eo_bind_func_generate(class, fnid, EOLIAN_PROP_GET, 
str_bodyf, impl_desc, &impl_env);
                    eina_stringshare_del(rets);
@@ -840,7 +840,7 @@ eo_source_end_generate(const Eolian_Class *class, 
Eina_Strbuf *buf)
            default:
              {
                 Eina_Stringshare *rets = eolian_function_full_c_name_get(fnid, 
ftype, EINA_FALSE);
-                eina_strbuf_append_printf(str_op, "\n      
EFL_OBJECT_OP_%sFUNC_OVERRIDE(%s, %s_%s),",
+                eina_strbuf_append_printf(str_op, "\n      
EFL_OBJECT_OP_%sFUNC(%s, %s_%s),",
                       class_str, rets, implname, funcname);
                 eo_bind_func_generate(class, fnid, ftype, str_bodyf, 
impl_desc, &impl_env);
                 eina_stringshare_del(rets);
diff --git a/src/lib/elementary/efl_ui_grid.c b/src/lib/elementary/efl_ui_grid.c
index cb72cdf..3261c29 100644
--- a/src/lib/elementary/efl_ui_grid.c
+++ b/src/lib/elementary/efl_ui_grid.c
@@ -169,7 +169,7 @@ static Eina_Bool
 _custom_table_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_CLASS_FUNC_OVERRIDE(efl_canvas_group_calculate, 
_custom_table_calc)
+         EFL_OBJECT_OP_CLASS_FUNC(efl_canvas_group_calculate, 
_custom_table_calc)
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index f1aabd5..8fd5ca7 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -148,8 +148,6 @@ enum _Efl_Object_Op_Type
    EFL_OBJECT_OP_TYPE_INVALID = -1, /**< Invalid op. */
    EFL_OBJECT_OP_TYPE_REGULAR = 0, /**< Regular op. */
    EFL_OBJECT_OP_TYPE_CLASS, /**< Class op - a class op. Like static in 
Java/C++. */
-   EFL_OBJECT_OP_TYPE_REGULAR_OVERRIDE, /**< Regular op override (previously 
defined) */
-   EFL_OBJECT_OP_TYPE_CLASS_OVERRIDE, /**< Class op override (previously 
defined) */
 };
 
 /**
@@ -458,11 +456,11 @@ EAPI Eina_Bool efl_object_override(Eo *obj, const 
Efl_Object_Ops *ops);
  * @brief Define an array of override functions for @ref efl_object_override
  * @param ops A name for the Efl_Object_Ops local variable to define
  * @param ... A comma separated list of Efl_Object_Op overrides, using
- *            #EFL_OBJECT_OP_FUNC_OVERRIDE or 
#EFL_OBJECT_OP_CLASS_FUNC_OVERRIDE
+ *            #EFL_OBJECT_OP_FUNC or #EFL_OBJECT_OP_CLASS_FUNC
  *
  * This can be used as follows:
  * @code
- * EFL_OPS_DEFINE(ops, EFL_OBJECT_OP_FUNC_OVERRIDE(public_func, _my_func));
+ * EFL_OPS_DEFINE(ops, EFL_OBJECT_OP_FUNC(public_func, _my_func));
  * efl_object_override(obj, &ops);
  * @endcode
  *
@@ -848,8 +846,6 @@ typedef struct _Efl_Object_Call_Cache
 
 #define EFL_OBJECT_OP_FUNC(_api, _private) { _EFL_OBJECT_OP_API_ENTRY(_api), 
(void*)_private, EFL_OBJECT_OP_TYPE_REGULAR }
 #define EFL_OBJECT_OP_CLASS_FUNC(_api, _private) { 
_EFL_OBJECT_OP_API_ENTRY(_api), (void*)_private, EFL_OBJECT_OP_TYPE_CLASS }
-#define EFL_OBJECT_OP_FUNC_OVERRIDE(_api, _private) { 
_EFL_OBJECT_OP_API_ENTRY(_api), (void*)_private, 
EFL_OBJECT_OP_TYPE_REGULAR_OVERRIDE }
-#define EFL_OBJECT_OP_CLASS_FUNC_OVERRIDE(_api, _private) { 
_EFL_OBJECT_OP_API_ENTRY(_api), (void*)_private, 
EFL_OBJECT_OP_TYPE_CLASS_OVERRIDE }
 
 // returns the OP id corresponding to the given api_func
 EAPI Efl_Object_Op _efl_object_api_op_id_get(const void *api_func);
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index bfc5be5..fa8a7f7 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -578,8 +578,8 @@ _eo_api_func_equal(const void *api_func1, const void 
*api_func2)
 #endif
 }
 
-EAPI Efl_Object_Op
-_efl_object_api_op_id_get(const void *api_func)
+static inline Efl_Object_Op
+_efl_object_api_op_id_get_internal(const void *api_func)
 {
    eina_spinlock_take(&_ops_storage_lock);
 #ifndef _WIN32
@@ -589,6 +589,14 @@ _efl_object_api_op_id_get(const void *api_func)
 #endif
    eina_spinlock_release(&_ops_storage_lock);
 
+   return op;
+}
+
+EAPI Efl_Object_Op
+_efl_object_api_op_id_get(const void *api_func)
+{
+   Efl_Object_Op op = _efl_object_api_op_id_get_internal(api_func);
+
    if (op == EFL_NOOP)
      {
         ERR("Unable to resolve op for api func %p", api_func);
@@ -600,7 +608,7 @@ _efl_object_api_op_id_get(const void *api_func)
 /* klass is the klass we are working on. hierarchy_klass is the class whe 
should
  * use when validating. */
 static Eina_Bool
-_eo_class_funcs_set(Eo_Vtable *vtable, const Efl_Object_Ops *ops, const 
_Efl_Class *hierarchy_klass, const _Efl_Class *klass, Eina_Bool override_only)
+_eo_class_funcs_set(Eo_Vtable *vtable, const Efl_Object_Ops *ops, const 
_Efl_Class *hierarchy_klass, const _Efl_Class *klass, Eina_Bool override_only 
EINA_UNUSED)
 {
    unsigned int i;
    int op_id;
@@ -629,12 +637,6 @@ _eo_class_funcs_set(Eo_Vtable *vtable, const 
Efl_Object_Ops *ops, const _Efl_Cla
 
         if ((op_desc->op_type == EFL_OBJECT_OP_TYPE_REGULAR) || 
(op_desc->op_type == EFL_OBJECT_OP_TYPE_CLASS))
           {
-             if (override_only)
-               {
-                  ERR("Creation of new functions is not allowed when 
overriding an object's vtable.");
-                  return EINA_FALSE;
-               }
-
              if (_eo_api_func_equal(op_desc->api_func, last_api_func))
                {
                   ERR("Class '%s': API previously defined (%p->%p '%s').",
@@ -642,21 +644,21 @@ _eo_class_funcs_set(Eo_Vtable *vtable, const 
Efl_Object_Ops *ops, const _Efl_Cla
                   return EINA_FALSE;
                }
 
-             op = op_id;
-             eina_spinlock_take(&_ops_storage_lock);
+             op = _efl_object_api_op_id_get_internal(op_desc->api_func);
+
+             if (op == EFL_NOOP)
+               {
+                  op = op_id;
+                  eina_spinlock_take(&_ops_storage_lock);
 #ifndef _WIN32
-             eina_hash_add(_ops_storage, &op_desc->api_func, (void *) 
(uintptr_t) op);
+                  eina_hash_add(_ops_storage, &op_desc->api_func, (void *) 
(uintptr_t) op);
 #else
-             eina_hash_add(_ops_storage, op_desc->api_func, (void *) 
(uintptr_t) op);
+                  eina_hash_add(_ops_storage, op_desc->api_func, (void *) 
(uintptr_t) op);
 #endif
-             eina_spinlock_release(&_ops_storage_lock);
+                  eina_spinlock_release(&_ops_storage_lock);
 
-             op_id++;
-          }
-        else if ((op_desc->op_type == EFL_OBJECT_OP_TYPE_REGULAR_OVERRIDE) || 
(op_desc->op_type == EFL_OBJECT_OP_TYPE_CLASS_OVERRIDE))
-          {
-             /* We allow any overrides, we don't check if in hierarchy. */
-             op = _efl_object_api_op_id_get(op_desc->api_func);
+                  op_id++;
+               }
           }
 
         if (op == EFL_NOOP)
diff --git a/src/tests/eo/composite_objects/composite_objects_comp.c 
b/src/tests/eo/composite_objects/composite_objects_comp.c
index ee6686d..f96ee35 100644
--- a/src/tests/eo/composite_objects/composite_objects_comp.c
+++ b/src/tests/eo/composite_objects/composite_objects_comp.c
@@ -40,8 +40,8 @@ static Eina_Bool
 _class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_constructor, _constructor),
-         EFL_OBJECT_OP_FUNC_OVERRIDE(simple_a_get, _a_get),
+         EFL_OBJECT_OP_FUNC(efl_constructor, _constructor),
+         EFL_OBJECT_OP_FUNC(simple_a_get, _a_get),
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/tests/eo/constructors/constructors_mixin.c 
b/src/tests/eo/constructors/constructors_mixin.c
index a68c10b..7911602 100644
--- a/src/tests/eo/constructors/constructors_mixin.c
+++ b/src/tests/eo/constructors/constructors_mixin.c
@@ -42,8 +42,8 @@ _class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
          EFL_OBJECT_OP_FUNC(mixin_add_and_print, _add_and_print_set),
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_constructor, _constructor),
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_destructor, _destructor),
+         EFL_OBJECT_OP_FUNC(efl_constructor, _constructor),
+         EFL_OBJECT_OP_FUNC(efl_destructor, _destructor),
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/tests/eo/constructors/constructors_simple.c 
b/src/tests/eo/constructors/constructors_simple.c
index 62d47d2..ca6de0c 100644
--- a/src/tests/eo/constructors/constructors_simple.c
+++ b/src/tests/eo/constructors/constructors_simple.c
@@ -89,9 +89,9 @@ static Eina_Bool
 _class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_constructor, _constructor),
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_destructor, _destructor),
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_finalize, _finalize),
+         EFL_OBJECT_OP_FUNC(efl_constructor, _constructor),
+         EFL_OBJECT_OP_FUNC(efl_destructor, _destructor),
+         EFL_OBJECT_OP_FUNC(efl_finalize, _finalize),
          EFL_OBJECT_OP_FUNC(simple_a_set, _a_set),
          EFL_OBJECT_OP_FUNC(simple_a_get, _a_get),
          EFL_OBJECT_OP_FUNC(simple_b_set, _b_set),
diff --git a/src/tests/eo/constructors/constructors_simple2.c 
b/src/tests/eo/constructors/constructors_simple2.c
index e97b95f..2cd3e89 100644
--- a/src/tests/eo/constructors/constructors_simple2.c
+++ b/src/tests/eo/constructors/constructors_simple2.c
@@ -20,7 +20,7 @@ static Eina_Bool
 _class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_constructor, _constructor),
+         EFL_OBJECT_OP_FUNC(efl_constructor, _constructor),
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/tests/eo/constructors/constructors_simple3.c 
b/src/tests/eo/constructors/constructors_simple3.c
index 8e7bdc5..f66dada 100644
--- a/src/tests/eo/constructors/constructors_simple3.c
+++ b/src/tests/eo/constructors/constructors_simple3.c
@@ -18,7 +18,7 @@ static Eina_Bool
 _class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_constructor, _constructor),
+         EFL_OBJECT_OP_FUNC(efl_constructor, _constructor),
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/tests/eo/constructors/constructors_simple5.c 
b/src/tests/eo/constructors/constructors_simple5.c
index 86d9167..21a3549 100644
--- a/src/tests/eo/constructors/constructors_simple5.c
+++ b/src/tests/eo/constructors/constructors_simple5.c
@@ -18,7 +18,7 @@ static Eina_Bool
 _class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_destructor, _destructor),
+         EFL_OBJECT_OP_FUNC(efl_destructor, _destructor),
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/tests/eo/constructors/constructors_simple6.c 
b/src/tests/eo/constructors/constructors_simple6.c
index ffe9909..0bd8144 100644
--- a/src/tests/eo/constructors/constructors_simple6.c
+++ b/src/tests/eo/constructors/constructors_simple6.c
@@ -18,7 +18,7 @@ static Eina_Bool
 _class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_destructor, _destructor),
+         EFL_OBJECT_OP_FUNC(efl_destructor, _destructor),
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/tests/eo/constructors/constructors_simple7.c 
b/src/tests/eo/constructors/constructors_simple7.c
index 815b974..54ddd14 100644
--- a/src/tests/eo/constructors/constructors_simple7.c
+++ b/src/tests/eo/constructors/constructors_simple7.c
@@ -22,7 +22,7 @@ static Eina_Bool
 _class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_constructor, _constructor),
+         EFL_OBJECT_OP_FUNC(efl_constructor, _constructor),
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/tests/eo/function_overrides/function_overrides_inherit2.c 
b/src/tests/eo/function_overrides/function_overrides_inherit2.c
index 0211a8c..52105be 100644
--- a/src/tests/eo/function_overrides/function_overrides_inherit2.c
+++ b/src/tests/eo/function_overrides/function_overrides_inherit2.c
@@ -65,8 +65,8 @@ _class_initializer(Efl_Class *klass)
    EFL_OPS_DEFINE(ops,
          EFL_OBJECT_OP_FUNC(inherit2_print, _print),
          EFL_OBJECT_OP_FUNC(inherit2_print2, _print2),
-         EFL_OBJECT_OP_CLASS_FUNC_OVERRIDE(simple_class_print, _class_print),
-         EFL_OBJECT_OP_FUNC_OVERRIDE(simple_a_set, _a_set),
+         EFL_OBJECT_OP_CLASS_FUNC(simple_class_print, _class_print),
+         EFL_OBJECT_OP_FUNC(simple_a_set, _a_set),
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/tests/eo/function_overrides/function_overrides_inherit3.c 
b/src/tests/eo/function_overrides/function_overrides_inherit3.c
index 1043a2a..7e7cd75 100644
--- a/src/tests/eo/function_overrides/function_overrides_inherit3.c
+++ b/src/tests/eo/function_overrides/function_overrides_inherit3.c
@@ -20,7 +20,7 @@ static Eina_Bool
 _class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(simple_a_set, _a_set),
+         EFL_OBJECT_OP_FUNC(simple_a_set, _a_set),
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/tests/eo/interface/interface_simple.c 
b/src/tests/eo/interface/interface_simple.c
index 433de5c..0b5806c 100644
--- a/src/tests/eo/interface/interface_simple.c
+++ b/src/tests/eo/interface/interface_simple.c
@@ -64,8 +64,8 @@ _class_initializer(Efl_Class *klass)
          EFL_OBJECT_OP_FUNC(simple_a_get, _a_get),
          EFL_OBJECT_OP_FUNC(simple_b_set, _b_set),
          EFL_OBJECT_OP_FUNC(simple_b_get, _b_get),
-         EFL_OBJECT_OP_FUNC_OVERRIDE(interface_ab_sum_get, _ab_sum_get),
-         EFL_OBJECT_OP_FUNC_OVERRIDE(interface2_ab_sum_get2, _ab_sum_get2),
+         EFL_OBJECT_OP_FUNC(interface_ab_sum_get, _ab_sum_get),
+         EFL_OBJECT_OP_FUNC(interface2_ab_sum_get2, _ab_sum_get2),
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/tests/eo/mixin/mixin_inherit.c 
b/src/tests/eo/mixin/mixin_inherit.c
index 5c4503f..0600823 100644
--- a/src/tests/eo/mixin/mixin_inherit.c
+++ b/src/tests/eo/mixin/mixin_inherit.c
@@ -23,7 +23,7 @@ static Eina_Bool
 _class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(simple_a_get, _a_get),
+         EFL_OBJECT_OP_FUNC(simple_a_get, _a_get),
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/tests/eo/mixin/mixin_mixin.c b/src/tests/eo/mixin/mixin_mixin.c
index e5ac3af..4ef198a 100644
--- a/src/tests/eo/mixin/mixin_mixin.c
+++ b/src/tests/eo/mixin/mixin_mixin.c
@@ -36,8 +36,8 @@ static Eina_Bool
 _class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_constructor, _constructor),
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_destructor, _destructor),
+         EFL_OBJECT_OP_FUNC(efl_constructor, _constructor),
+         EFL_OBJECT_OP_FUNC(efl_destructor, _destructor),
          EFL_OBJECT_OP_FUNC(mixin_ab_sum_get, _ab_sum_get),
    );
 
diff --git a/src/tests/eo/mixin/mixin_mixin2.c 
b/src/tests/eo/mixin/mixin_mixin2.c
index 38547da..e29f7e8 100644
--- a/src/tests/eo/mixin/mixin_mixin2.c
+++ b/src/tests/eo/mixin/mixin_mixin2.c
@@ -50,9 +50,9 @@ static Eina_Bool
 _class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_constructor, _constructor),
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_destructor, _destructor),
-         EFL_OBJECT_OP_FUNC_OVERRIDE(mixin_ab_sum_get, _ab_sum_get),
+         EFL_OBJECT_OP_FUNC(efl_constructor, _constructor),
+         EFL_OBJECT_OP_FUNC(efl_destructor, _destructor),
+         EFL_OBJECT_OP_FUNC(mixin_ab_sum_get, _ab_sum_get),
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/tests/eo/mixin/mixin_mixin3.c 
b/src/tests/eo/mixin/mixin_mixin3.c
index 21da5d0..3282873 100644
--- a/src/tests/eo/mixin/mixin_mixin3.c
+++ b/src/tests/eo/mixin/mixin_mixin3.c
@@ -49,9 +49,9 @@ static Eina_Bool
 _class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_constructor, _constructor),
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_destructor, _destructor),
-         EFL_OBJECT_OP_FUNC_OVERRIDE(mixin_ab_sum_get, _ab_sum_get),
+         EFL_OBJECT_OP_FUNC(efl_constructor, _constructor),
+         EFL_OBJECT_OP_FUNC(efl_destructor, _destructor),
+         EFL_OBJECT_OP_FUNC(mixin_ab_sum_get, _ab_sum_get),
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/tests/eo/signals/signals_simple.c 
b/src/tests/eo/signals/signals_simple.c
index 3cd4d94..403c109 100644
--- a/src/tests/eo/signals/signals_simple.c
+++ b/src/tests/eo/signals/signals_simple.c
@@ -75,7 +75,7 @@ static Eina_Bool
 _class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_constructor, _constructor),
+         EFL_OBJECT_OP_FUNC(efl_constructor, _constructor),
          EFL_OBJECT_OP_FUNC(simple_a_set, _a_set),
    );
 
diff --git a/src/tests/eo/suite/eo_test_class_behaviour_errors.c 
b/src/tests/eo/suite/eo_test_class_behaviour_errors.c
index fc443fb..49fef3b 100644
--- a/src/tests/eo/suite/eo_test_class_behaviour_errors.c
+++ b/src/tests/eo/suite/eo_test_class_behaviour_errors.c
@@ -26,7 +26,7 @@ static Eina_Bool
 _destructor_unref_class_initializer(Efl_Class *klass2)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_destructor, _destructor_unref),
+         EFL_OBJECT_OP_FUNC(efl_destructor, _destructor_unref),
    );
 
    return efl_class_functions_set(klass2, &ops);
diff --git a/src/tests/eo/suite/eo_test_class_errors.c 
b/src/tests/eo/suite/eo_test_class_errors.c
index 89ad49b..0e475b5 100644
--- a/src/tests/eo/suite/eo_test_class_errors.c
+++ b/src/tests/eo/suite/eo_test_class_errors.c
@@ -241,39 +241,6 @@ START_TEST(eo_null_api)
 END_TEST
 
 static Eina_Bool
-_wrong_override_class_initializer(Efl_Class *klass)
-{
-   EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(null_fct, _null_fct),
-   );
-
-   return efl_class_functions_set(klass, &ops);
-}
-
-START_TEST(eo_wrong_override)
-{
-   efl_object_init();
-
-   const Efl_Class *klass;
-
-   static Efl_Class_Description class_desc = {
-        EO_VERSION,
-        "Simple",
-        EFL_CLASS_TYPE_REGULAR,
-        0,
-        _wrong_override_class_initializer,
-        NULL,
-        NULL
-   };
-
-   klass = efl_class_new(&class_desc, NULL, NULL);
-   fail_if(klass);
-
-   efl_object_shutdown();
-}
-END_TEST
-
-static Eina_Bool
 _redefined_class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
@@ -316,8 +283,8 @@ static Eina_Bool
 _dich_func_class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(simple_a_set, _null_fct),
-         EFL_OBJECT_OP_FUNC_OVERRIDE(simple_a_set, NULL),
+         EFL_OBJECT_OP_FUNC(simple_a_set, _null_fct),
+         EFL_OBJECT_OP_FUNC(simple_a_set, NULL),
    );
 
    return efl_class_functions_set(klass, &ops);
@@ -340,7 +307,7 @@ START_TEST(eo_dich_func_override)
         NULL
    };
 
-   TEST_EO_ERROR("_vtable_func_set", "Class '%s': Overriding already set func 
%p for op %d (%s) with %p.");
+   TEST_EO_ERROR("_eo_class_funcs_set", "Class '%s': API previously defined 
(%p->%p '%s').");
    klass = efl_class_new(&class_desc, SIMPLE_CLASS, NULL);
    fail_if(klass);
    fail_unless(ctx.did);
@@ -360,7 +327,6 @@ void eo_test_class_errors(TCase *tc)
    /* This test is not relevant for WIN32. */
    tcase_add_test(tc, eo_null_api);
 #endif
-   tcase_add_test(tc, eo_wrong_override);
    tcase_add_test(tc, eo_api_redefined);
    tcase_add_test(tc, eo_dich_func_override);
 }
diff --git a/src/tests/eo/suite/eo_test_class_simple.c 
b/src/tests/eo/suite/eo_test_class_simple.c
index 56d424c..a740e43 100644
--- a/src/tests/eo/suite/eo_test_class_simple.c
+++ b/src/tests/eo/suite/eo_test_class_simple.c
@@ -99,7 +99,7 @@ _class_initializer(Efl_Class *klass)
          EFL_OBJECT_OP_FUNC(simple_recursive, _recursive),
          EFL_OBJECT_OP_FUNC(simple_part_get, _part_get),
          EFL_OBJECT_OP_FUNC(simple_pure_virtual, NULL),
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_dbg_info_get, _dbg_info_get),
+         EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _dbg_info_get),
    );
 
    return efl_class_functions_set(klass, &ops);
@@ -160,7 +160,7 @@ static Eina_Bool
 _searchable_class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_provider_find, _interface_get)
+         EFL_OBJECT_OP_FUNC(efl_provider_find, _interface_get)
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/tests/eo/suite/eo_test_class_singleton.c 
b/src/tests/eo/suite/eo_test_class_singleton.c
index 2702d68..4bed42e 100644
--- a/src/tests/eo/suite/eo_test_class_singleton.c
+++ b/src/tests/eo/suite/eo_test_class_singleton.c
@@ -29,7 +29,7 @@ static Eina_Bool
 _class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_constructor, 
_singleton_efl_constructor),
+         EFL_OBJECT_OP_FUNC(efl_constructor, _singleton_efl_constructor),
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/tests/eo/suite/eo_test_general.c 
b/src/tests/eo/suite/eo_test_general.c
index 9be6de5..ccc07ef 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -76,7 +76,7 @@ START_TEST(efl_object_override_tests)
 
    EFL_OPS_DEFINE(
             overrides,
-            EFL_OBJECT_OP_FUNC_OVERRIDE(simple_a_get, 
_simple_obj_override_a_get));
+            EFL_OBJECT_OP_FUNC(simple_a_get, _simple_obj_override_a_get));
    fail_if(!efl_object_override(obj, &overrides));
 
    ck_assert_int_eq(simple_a_get(obj), OVERRIDE_A);
@@ -88,7 +88,7 @@ START_TEST(efl_object_override_tests)
    /* Override again. */
    EFL_OPS_DEFINE(
             overrides2,
-            EFL_OBJECT_OP_FUNC_OVERRIDE(simple_a_set, 
_simple_obj_override_a_double_set));
+            EFL_OBJECT_OP_FUNC(simple_a_set, 
_simple_obj_override_a_double_set));
    fail_if(!efl_object_override(obj, NULL));
    fail_if(!efl_object_override(obj, &overrides2));
 
@@ -104,7 +104,7 @@ START_TEST(efl_object_override_tests)
             overrides3,
             EFL_OBJECT_OP_FUNC(simple2_class_beef_get, 
_simple_obj_override_a_double_set));
    fail_if(!efl_object_override(obj, NULL));
-   fail_if(efl_object_override(obj, &overrides3));
+   fail_if(!efl_object_override(obj, &overrides3));
 
    /* Test override reset */
    fail_if(!efl_object_override(obj, NULL));
@@ -432,8 +432,8 @@ static Eina_Bool
 _class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_constructor, _man_con),
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_destructor, _man_des),
+         EFL_OBJECT_OP_FUNC(efl_constructor, _man_con),
+         EFL_OBJECT_OP_FUNC(efl_destructor, _man_des),
    );
 
    return efl_class_functions_set(klass, &ops);
@@ -1166,7 +1166,7 @@ static Eina_Bool
 _add_failures_class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-         EFL_OBJECT_OP_FUNC_OVERRIDE(efl_finalize, _efl_add_failures_finalize),
+         EFL_OBJECT_OP_FUNC(efl_finalize, _efl_add_failures_finalize),
    );
 
    return efl_class_functions_set(klass, &ops);
diff --git a/src/tests/eolian/data/override_ref.c 
b/src/tests/eolian/data/override_ref.c
index 3a77e8c..f54b9dc 100644
--- a/src/tests/eolian/data/override_ref.c
+++ b/src/tests/eolian/data/override_ref.c
@@ -57,9 +57,9 @@ static Eina_Bool
 _override_class_initializer(Efl_Class *klass)
 {
    EFL_OPS_DEFINE(ops,
-      EFL_OBJECT_OP_FUNC_OVERRIDE(base_constructor, 
_override_base_constructor),
-      EFL_OBJECT_OP_FUNC_OVERRIDE(base_z_get, __eolian_override_base_z_get),
-      EFL_OBJECT_OP_FUNC_OVERRIDE(base_z_set, __eolian_override_base_z_set),
+      EFL_OBJECT_OP_FUNC(base_constructor, _override_base_constructor),
+      EFL_OBJECT_OP_FUNC(base_z_get, __eolian_override_base_z_get),
+      EFL_OBJECT_OP_FUNC(base_z_set, __eolian_override_base_z_set),
       EFL_OBJECT_OP_FUNC(override_b_set, __eolian_override_b_set),
       EFL_OBJECT_OP_FUNC(override_bar, __eolian_override_bar),
       EFL_OBJECT_OP_FUNC(override_c_get, __eolian_override_c_get),

-- 


Reply via email to