From 036cfc32e451a66ea23ee4e9f1dbdb8f6b7c22e1 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 17 Nov 2016 16:49:52 +0900 Subject: [PATCH] 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 f46e2c8995..218ef40390 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