diff options
author | Tom Hacohen <tom@stosb.com> | 2014-09-30 14:27:43 +0100 |
---|---|---|
committer | Tom Hacohen <tom@stosb.com> | 2014-09-30 14:27:43 +0100 |
commit | 08ccaf5740b17ea632554360e7fd64c9d543ea5c (patch) | |
tree | 557cefff93ac10965ebe30ad002d2440941c316e | |
parent | a4d716d1c0ea5470f319413d82e915798ce9600e (diff) | |
download | efl-devs/tasn/eo_fix.tar.gz |
Fixoring.devs/tasn/eo_fix
-rw-r--r-- | src/lib/eo/eo.c | 9 | ||||
-rw-r--r-- | src/lib/eo/eo_private.h | 10 |
2 files changed, 8 insertions, 11 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index fa64ce135f..e78b6f0f24 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -1546,7 +1546,14 @@ eo_unref(const Eo *obj_id) EAPI void eo_del(const Eo *obj) { - eo_unref(obj); + if (eo_do(obj, eo_parent_get())) + { + eo_do(obj, eo_parent_set(NULL)); + } + else + { + eo_unref(obj); + } } EAPI int diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h index 1c21d2255e..be0a03a09d 100644 --- a/src/lib/eo/eo_private.h +++ b/src/lib/eo/eo_private.h @@ -284,16 +284,6 @@ _eo_unref(_Eo_Object *obj) return; } - /* Unparent if parented. */ - { - Eo *eo_id = _eo_id_get(obj); - obj->refcount = 2; /* Needs to be high enough that parent set to null won't delete the object. */ - - eo_do(eo_id, eo_parent_set(NULL)); - - obj->refcount = 0; - } - _eo_del_internal(__FILE__, __LINE__, obj); #ifdef EO_DEBUG |