raster pushed a commit to branch master.

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

commit 036cfc32e451a66ea23ee4e9f1dbdb8f6b7c22e1
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Thu Nov 17 16:49:52 2016 +0900

    event callback call - move 0 check early before any var init
    
    a LOT of callback calls call on objects with no cb's at all so the
    earlier we check for 0 the better before we do ANYTHING.
    
    @optimize
---
 src/lib/eo/eo_base_class.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index f46e2c8..218ef40 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -1218,19 +1218,21 @@ _event_callback_call(Eo *obj_id, Efl_Object_Data *pd,
                      Eina_Bool legacy_compare)
 {
    Eo_Callback_Description **cb;
-   Eo_Current_Callback_Description *lookup = NULL;
-   Eo_Current_Callback_Description saved;
+   Eo_Current_Callback_Description *lookup, saved;
    Efl_Event ev;
    unsigned int idx;
-   Eina_Bool callback_already_stopped = pd->callback_stopped;
-   Eina_Bool ret = EINA_TRUE;
+   Eina_Bool callback_already_stopped, ret;
+
+   if (pd->callbacks_count == 0) return EINA_FALSE;
+
+   lookup = NULL;
+   callback_already_stopped = pd->callback_stopped;
+   ret = EINA_TRUE;
 
    ev.object = obj_id;
    ev.desc = desc;
    ev.info = event_info;
 
-   if (pd->callbacks_count == 0) return EINA_FALSE;
-
    pd->walking_list++;
 
    // Handle event that require to restart where we were in the nested list 
walking

-- 


Reply via email to