From 46885653bc0467f88042bb110fdc973b2258f69c Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sun, 10 Feb 2019 16:57:00 +0100 Subject: eo: remove class functions from eo As in the previous commit explained, we want to get rid of class functions in eo, and make them just c functions right away. This commit removes the class parameter from the eo_class_function_set call, and adjusts the tests to not depend on class functions anymore. Class functions are now not tested anymore, tests that used them as a way to test *things* are adjusted to test them now with object functions, tests that just tested the working of class functions are dropped. This fixes T7675. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D7902 --- src/lib/eo/Eo.h | 2 +- src/lib/eo/eo.c | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'src/lib/eo') diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index 2fd2c1b7e8..df5dc338e0 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -897,7 +897,7 @@ EAPI const Efl_Class *efl_class_new(const Efl_Class_Description *desc, const Efl * efl_property_reflection_set() or efl_property_reflection_get() is called. * @see #EFL_DEFINE_CLASS */ -EAPI Eina_Bool efl_class_functions_set(const Efl_Class *klass_id, const Efl_Object_Ops *object_ops, const Efl_Object_Ops *class_ops, const Efl_Object_Property_Reflection_Ops *reflection_table); +EAPI Eina_Bool efl_class_functions_set(const Efl_Class *klass_id, const Efl_Object_Ops *object_ops, const Efl_Object_Property_Reflection_Ops *reflection_table); /** * @brief Override Eo functions of this object. diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 95823f7a08..0611643546 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -819,7 +819,7 @@ _eo_class_funcs_set(Eo_Vtable *vtable, const Efl_Object_Ops *ops, const _Efl_Cla } EAPI Eina_Bool -efl_class_functions_set(const Efl_Class *klass_id, const Efl_Object_Ops *object_ops, const Efl_Object_Ops *class_ops, const Efl_Object_Property_Reflection_Ops *reflection_table) +efl_class_functions_set(const Efl_Class *klass_id, const Efl_Object_Ops *object_ops, const Efl_Object_Property_Reflection_Ops *reflection_table) { EO_CLASS_POINTER_GOTO(klass_id, klass, err_klass); Efl_Object_Ops empty_ops = { 0 }; @@ -830,11 +830,9 @@ efl_class_functions_set(const Efl_Class *klass_id, const Efl_Object_Ops *object_ if (!object_ops) object_ops = &empty_ops; - if (!class_ops) class_ops = &empty_ops; - klass->reflection = reflection_table; - klass->ops_count = object_ops->count + class_ops->count; + klass->ops_count = object_ops->count; klass->base_id = _eo_ops_last_id; _eo_ops_last_id += klass->ops_count + 1; @@ -851,8 +849,7 @@ efl_class_functions_set(const Efl_Class *klass_id, const Efl_Object_Ops *object_ _vtable_copy_all(&klass->vtable, &(*mro_itr)->vtable); } - return _eo_class_funcs_set(&klass->vtable, object_ops, klass, klass, 0, EINA_FALSE) && - _eo_class_funcs_set(&klass->vtable, class_ops, klass, klass, object_ops->count, EINA_FALSE); + return _eo_class_funcs_set(&klass->vtable, object_ops, klass, klass, 0, EINA_FALSE); err_funcs: ERR("Class %s already had its functions set..", klass->desc->name); @@ -1693,7 +1690,7 @@ efl_class_new(const Efl_Class_Description *desc, const Efl_Class *parent_id, ... /* If functions haven't been set, invoke it with an empty ops structure. */ if (!klass->functions_set) { - efl_class_functions_set(_eo_class_id_get(klass), NULL, NULL, NULL); + efl_class_functions_set(_eo_class_id_get(klass), NULL, NULL); } /* Mark which classes we implement */ -- cgit v1.2.1