From a11836b5a1dd075989fd7135d59f7ab8d4ec040a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Wed, 15 Feb 2017 15:19:08 +0900 Subject: [PATCH] eo_debug: Some more log improvements Nothing fancy here... --- src/lib/eo/eo.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 182a3a4..a032e917 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -1917,36 +1917,32 @@ _efl_data_xref_internal(const char *file, int line, _Eo_Object *obj, const _Efl_ } static inline void -_efl_data_xunref_internal(_Eo_Object *obj, void *data, const _Eo_Object *ref_obj) +_efl_data_xunref_internal(_Eo_Object *obj EINA_UNUSED, void *data EINA_UNUSED, const _Eo_Object *ref_obj EINA_UNUSED) { #ifdef EO_DEBUG const _Efl_Class *klass = obj->klass; + Eo_Xref_Node *xref = NULL; Eina_Bool in_range = (((char *)data >= (((char *) obj) + _eo_sz)) && ((char *)data < (((char *) obj) + klass->obj_size))); if (!in_range) { - ERR("Data %p is not in the data range of the object %p (%s).", data, (Eo *)obj->header.id, obj->klass->desc->name); + ERR("Data %p is not in the data range of the object %p (%s).", + data, _eo_obj_id_get(obj), obj->klass->desc->name); } -#else - (void) obj; - (void) data; -#endif -#ifdef EO_DEBUG if (obj->datarefcount == 0) { - ERR("Data for object %zx (%s) is already not referenced.", (size_t)_eo_obj_id_get(obj), obj->klass->desc->name); + ERR("Data for object %p (%s) is already not referenced.", + _eo_obj_id_get(obj), obj->klass->desc->name); } else { (obj->datarefcount)--; } - Eo_Xref_Node *xref = NULL; EINA_INLIST_FOREACH(obj->data_xrefs, xref) { if (xref->ref_obj == _eo_obj_id_get(ref_obj)) break; } - if (xref) { obj->data_xrefs = eina_inlist_remove(obj->data_xrefs, EINA_INLIST_GET(xref)); @@ -1954,10 +1950,10 @@ _efl_data_xunref_internal(_Eo_Object *obj, void *data, const _Eo_Object *ref_obj } else { - ERR("ref_obj (0x%zx) does not reference data (%p) of obj (0x%zx).", (size_t)_eo_obj_id_get(ref_obj), data, (size_t)_eo_obj_id_get(obj)); + ERR("ref_obj %p (%s) does not reference data %p of obj %p (%s).", + _eo_obj_id_get(ref_obj), ref_obj->klass->desc->name, data, + _eo_obj_id_get(obj), obj->klass->desc->name); } -#else - (void) ref_obj; #endif } -- 2.7.4