cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4a25abccd674083707bbd53bb3647786362e98f3
commit 4a25abccd674083707bbd53bb3647786362e98f3 Author: Cedric BAIL <[email protected]> Date: Wed Jan 23 15:33:01 2019 -0800 eo: remove function efl_noref that duplicate EFL_EVENT_NOREF. efl_noref is unused, but will still trigger the full eo call for nothing. This was the most expensive NOOP. EFL_EVENT_NOREF does the same thing and we can even filter generating that call as we know when someone is listening. So removing the function. Reviewed-by: Derek Foreman <[email protected]> Reviewed-by: Xavi Artigas <[email protected]> Differential Revision: https://phab.enlightenment.org/D7742 --- src/lib/eo/efl_object.eo | 6 ------ src/lib/eo/eo.c | 3 +-- src/lib/eo/eo_base_class.c | 5 ----- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/lib/eo/efl_object.eo b/src/lib/eo/efl_object.eo index 6049ceb29a..f898e2bbcc 100644 --- a/src/lib/eo/efl_object.eo +++ b/src/lib/eo/efl_object.eo @@ -195,12 +195,6 @@ abstract Efl.Object invalidate { [[Called when parent reference is lost/set to $NULL and switch the state of the object to invalidate.]] } - noref { - [[Triggered when no reference are keeping the object alive. - - The parent can be the last one keeping an object alive and so $noref can happen before $invalidate - as it is only impacted by the ref/unref of the object.]] - } name_find @const { [[Find a child object with the given name and return it. diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 82299fe622..78bed1ad4b 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -1928,7 +1928,7 @@ efl_unref(const Eo *obj_id) ((obj->user_refcount == 1 && !obj->parent) || (obj->user_refcount == 2 && obj->parent)))) { - // We need to report efl_ref_count correctly during efl_noref, so fake it + // We need to report efl_ref_count correctly during EFL_EVENT_NOREF, so fake it // by adjusting efl_ref_count while inside efl_unref (This should avoid // infinite loop) obj->unref_compensate = EINA_TRUE; @@ -1936,7 +1936,6 @@ efl_unref(const Eo *obj_id) // The noref event should happen before any object in the // tree get affected by the change in refcount. efl_event_callback_call((Eo *) obj_id, EFL_EVENT_NOREF, NULL); - efl_noref((Eo *) obj_id); obj->unref_compensate = EINA_FALSE; } diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c index ef3a1ba9a8..bfe9eaca9e 100644 --- a/src/lib/eo/eo_base_class.c +++ b/src/lib/eo/eo_base_class.c @@ -189,11 +189,6 @@ _efl_invalidate(_Eo_Object *obj) obj->invalidate = EINA_TRUE; } -static void -_efl_object_noref(Eo *obj EINA_UNUSED, Efl_Object_Data *pd EINA_UNUSED) -{ -} - static inline void _efl_object_extension_free(Efl_Object_Extension *ext) { --
