summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-04-25 10:05:32 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-04-25 10:05:32 -0300
commit9dde75f055cecfd9d994fe54b3a3ae2d2df0a18f (patch)
tree478ef7d955127cd07fec594abbb620f95340992f
parent586d5601d211c68a9619b1ae83969c39701059bd (diff)
downloadefl-devs/felipealmeida/eo_ownership_optimization_test.tar.gz
-rw-r--r--src/lib/eo/eo.c2
-rw-r--r--src/lib/eo/eo_private.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 770ac00dc5..9b04cce435 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -1933,7 +1933,7 @@ efl_ref(const Eo *obj_id)
++(obj->user_refcount);
if (EINA_UNLIKELY(obj->user_refcount == 1))
_efl_ref(obj);
- else if (obj->ownership_track && !obj->auto_unref && obj->user_refcount == 2)
+ else if (EINA_UNLIKELY(obj->ownership_track && obj->user_refcount == 2))
efl_event_callback_call((Eo *) obj_id, EFL_EVENT_OWNERSHIP_SHARED, NULL);
#ifdef EO_DEBUG
diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h
index c64dee5f5e..3fa5629a1f 100644
--- a/src/lib/eo/eo_private.h
+++ b/src/lib/eo/eo_private.h
@@ -112,6 +112,7 @@ struct _Eo_Object
short datarefcount;
#endif
+ Eina_Bool ownership_track;
Eina_Bool condtor_done:1;
Eina_Bool finalized:1;
Eina_Bool super:1;
@@ -126,7 +127,6 @@ struct _Eo_Object
Eina_Bool destructed:1;
Eina_Bool manual_free:1;
unsigned char auto_unref : 1; // unref after 1 call - hack for parts
- Eina_Bool ownership_track:1;
};
/* How we search and store the implementations in classes. */