barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2e0fcbe5b46244cbae7193cd7f4513db2d28c92d

commit 2e0fcbe5b46244cbae7193cd7f4513db2d28c92d
Author: Gustavo Sverzut Barbieri <[email protected]>
Date:   Sat Dec 3 09:44:44 2016 -0200

    eo: fix compilation without HAVE_BACKTRACE.
    
    time_get() function was used even in that case to log when objects
    were created or deleted.
    
    thanks @vtorri.
---
 src/lib/eo/eo.c | 72 ++++++++++++++++++++++++++++-----------------------------
 1 file changed, 36 insertions(+), 36 deletions(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index b5647d2..a540492 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -2372,42 +2372,6 @@ efl_callbacks_cmp(const Efl_Callback_Array_Item *a, 
const Efl_Callback_Array_Ite
 }
 
 #ifdef EO_DEBUG
-#ifdef HAVE_BACKTRACE
-typedef struct _Eo_Log_Obj_Entry {
-   Eo_Id id;
-   const _Eo_Object *obj;
-   const _Efl_Class *klass;
-   double timestamp;
-   Eina_Bool is_free;
-   uint8_t bt_size;
-   void *bt[];
-} Eo_Log_Obj_Entry;
-
-static void
-_eo_log_obj_find(const Eo_Id id, const Eo_Log_Obj_Entry **added, const 
Eo_Log_Obj_Entry **deleted)
-{
-   const Eo_Log_Obj_Entry *entry;
-   Eina_Array_Iterator it;
-   unsigned int idx;
-
-   *added = NULL;
-   *deleted = NULL;
-
-   EINA_ARRAY_ITER_NEXT(&_eo_log_objs, idx, entry, it)
-     {
-        if (EINA_UNLIKELY(id == entry->id))
-          {
-             if (entry->is_free)
-               *deleted = entry;
-             else
-               {
-                  *added = entry;
-                  *deleted = NULL; /* forget previous add, if any */
-               }
-          }
-     }
-}
-
 /* NOTE: cannot use ecore_time_get()! */
 static inline double
 _eo_log_time_now(void)
@@ -2471,6 +2435,42 @@ _eo_log_time_now(void)
 #endif
 }
 
+#ifdef HAVE_BACKTRACE
+typedef struct _Eo_Log_Obj_Entry {
+   Eo_Id id;
+   const _Eo_Object *obj;
+   const _Efl_Class *klass;
+   double timestamp;
+   Eina_Bool is_free;
+   uint8_t bt_size;
+   void *bt[];
+} Eo_Log_Obj_Entry;
+
+static void
+_eo_log_obj_find(const Eo_Id id, const Eo_Log_Obj_Entry **added, const 
Eo_Log_Obj_Entry **deleted)
+{
+   const Eo_Log_Obj_Entry *entry;
+   Eina_Array_Iterator it;
+   unsigned int idx;
+
+   *added = NULL;
+   *deleted = NULL;
+
+   EINA_ARRAY_ITER_NEXT(&_eo_log_objs, idx, entry, it)
+     {
+        if (EINA_UNLIKELY(id == entry->id))
+          {
+             if (entry->is_free)
+               *deleted = entry;
+             else
+               {
+                  *added = entry;
+                  *deleted = NULL; /* forget previous add, if any */
+               }
+          }
+     }
+}
+
 static void
 _eo_log_obj_entry_show(const Eo_Log_Obj_Entry *entry, int log_level, const 
char *func_name, const char *file, int line, double now)
 {

-- 


Reply via email to