summaryrefslogtreecommitdiff
path: root/src/lib/eo
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-02-15 15:19:08 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-02-15 15:35:38 +0900
commita11836b5a1dd075989fd7135d59f7ab8d4ec040a (patch)
tree95b6aab89aedb3a6c558ada0cd7add6368436966 /src/lib/eo
parent2e96b5074dfb4212e72701db63de13222b9aa9b3 (diff)
eo_debug: Some more log improvements
Nothing fancy here...
Diffstat (limited to 'src/lib/eo')
-rw-r--r--src/lib/eo/eo.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 182a3a464d..a032e917c0 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_
1917} 1917}
1918 1918
1919static inline void 1919static inline void
1920_efl_data_xunref_internal(_Eo_Object *obj, void *data, const _Eo_Object *ref_obj) 1920_efl_data_xunref_internal(_Eo_Object *obj EINA_UNUSED, void *data EINA_UNUSED, const _Eo_Object *ref_obj EINA_UNUSED)
1921{ 1921{
1922#ifdef EO_DEBUG 1922#ifdef EO_DEBUG
1923 const _Efl_Class *klass = obj->klass; 1923 const _Efl_Class *klass = obj->klass;
1924 Eo_Xref_Node *xref = NULL;
1924 Eina_Bool in_range = (((char *)data >= (((char *) obj) + _eo_sz)) && 1925 Eina_Bool in_range = (((char *)data >= (((char *) obj) + _eo_sz)) &&
1925 ((char *)data < (((char *) obj) + klass->obj_size))); 1926 ((char *)data < (((char *) obj) + klass->obj_size)));
1926 if (!in_range) 1927 if (!in_range)
1927 { 1928 {
1928 ERR("Data %p is not in the data range of the object %p (%s).", data, (Eo *)obj->header.id, obj->klass->desc->name); 1929 ERR("Data %p is not in the data range of the object %p (%s).",
1930 data, _eo_obj_id_get(obj), obj->klass->desc->name);
1929 } 1931 }
1930#else
1931 (void) obj;
1932 (void) data;
1933#endif
1934#ifdef EO_DEBUG
1935 if (obj->datarefcount == 0) 1932 if (obj->datarefcount == 0)
1936 { 1933 {
1937 ERR("Data for object %zx (%s) is already not referenced.", (size_t)_eo_obj_id_get(obj), obj->klass->desc->name); 1934 ERR("Data for object %p (%s) is already not referenced.",
1935 _eo_obj_id_get(obj), obj->klass->desc->name);
1938 } 1936 }
1939 else 1937 else
1940 { 1938 {
1941 (obj->datarefcount)--; 1939 (obj->datarefcount)--;
1942 } 1940 }
1943 Eo_Xref_Node *xref = NULL;
1944 EINA_INLIST_FOREACH(obj->data_xrefs, xref) 1941 EINA_INLIST_FOREACH(obj->data_xrefs, xref)
1945 { 1942 {
1946 if (xref->ref_obj == _eo_obj_id_get(ref_obj)) 1943 if (xref->ref_obj == _eo_obj_id_get(ref_obj))
1947 break; 1944 break;
1948 } 1945 }
1949
1950 if (xref) 1946 if (xref)
1951 { 1947 {
1952 obj->data_xrefs = eina_inlist_remove(obj->data_xrefs, EINA_INLIST_GET(xref)); 1948 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
1954 } 1950 }
1955 else 1951 else
1956 { 1952 {
1957 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)); 1953 ERR("ref_obj %p (%s) does not reference data %p of obj %p (%s).",
1954 _eo_obj_id_get(ref_obj), ref_obj->klass->desc->name, data,
1955 _eo_obj_id_get(obj), obj->klass->desc->name);
1958 } 1956 }
1959#else
1960 (void) ref_obj;
1961#endif 1957#endif
1962} 1958}
1963 1959