cedric pushed a commit to branch master.

commit cc012b754c7c5dc7c01b584962b2c35b0ea7e0d5
Author: Cedric Bail <[email protected]>
Date:   Mon Jul 1 18:35:55 2013 +0900

    eo: little micro optimization.
---
 src/lib/eo/eo_base_class.c | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 49cfe7f..2cde9ff 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -314,14 +314,14 @@ _eo_callbacks_clear(Private_Data *pd)
 {
    Eo_Callback_Description *cb = NULL;
 
-   /* Abort if we are currently walking the list. */
-   if (pd->walking_list > 0)
-      return;
-
    /* If there are no deletions waiting. */
    if (!pd->deletions_waiting)
       return;
 
+   /* Abort if we are currently walking the list. */
+   if (pd->walking_list > 0)
+      return;
+
    pd->deletions_waiting = EINA_FALSE;
 
    for (cb = pd->callbacks ; cb ; )
@@ -501,20 +501,19 @@ _ev_cb_call(Eo *obj_id, void *class_data, va_list *list)
                }
              else
                {
+                  if (cb->items.item.desc != desc)
+                    continue;
                   if ((!cb->items.item.desc
                        || !cb->items.item.desc->unfreezable) &&
                       (event_freeze_count || pd->event_freeze_count))
                     continue;
 
-                  if (cb->items.item.desc == desc)
+                  /* Abort callback calling if the func says so. */
+                  if (!cb->items.item.func((void *) cb->func_data, obj_id, 
desc,
+                                           (void *) event_info))
                     {
-                       /* Abort callback calling if the func says so. */
-                       if (!cb->items.item.func((void *) cb->func_data, 
obj_id, desc,
-                                (void *) event_info))
-                         {
-                            if (ret) *ret = EINA_FALSE;
-                            goto end;
-                         }
+                       if (ret) *ret = EINA_FALSE;
+                       goto end;
                     }
                }
           }

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to