eo: Add class name to error log (unref)

This commit is contained in:
Jean-Philippe Andre 2017-09-07 09:51:09 +09:00
parent a73e4c7c80
commit 76bc13530a
2 changed files with 4 additions and 3 deletions

View File

@ -1838,7 +1838,8 @@ efl_unref(const Eo *obj_id)
{
if (obj->user_refcount < 0)
{
ERR("Obj:%p. User refcount (%d) < 0. Too many unrefs.", obj, obj->user_refcount);
ERR("Obj:%s@%p. User refcount (%d) < 0. Too many unrefs.",
obj->klass->desc->name, obj_id, obj->user_refcount);
_eo_log_obj_report((Eo_Id)obj_id, EINA_LOG_LEVEL_ERR, __FUNCTION__, __FILE__, __LINE__);
EO_OBJ_DONE(obj_id);
return;

View File

@ -53,7 +53,7 @@ START_TEST(efl_destructor_unref)
Eo *obj = efl_add(klass, NULL);
fail_if(!obj);
TEST_EO_ERROR("efl_unref", "Obj:%p. User refcount (%d) < 0. Too many unrefs.");
TEST_EO_ERROR("efl_unref", "Obj:%s@%p. User refcount (%d) < 0. Too many unrefs.");
efl_unref(obj);
eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
@ -84,7 +84,7 @@ START_TEST(efl_destructor_double_del)
efl_manual_free_set(obj, EINA_TRUE);
fail_if(!obj);
TEST_EO_ERROR("efl_unref", "Obj:%p. User refcount (%d) < 0. Too many unrefs.");
TEST_EO_ERROR("efl_unref", "Obj:%s@%p. User refcount (%d) < 0. Too many unrefs.");
efl_del(obj);
efl_del(obj);