diff options
author | Tom Hacohen <tom@stosb.com> | 2015-10-12 16:27:55 +0100 |
---|---|---|
committer | Tom Hacohen <tom@stosb.com> | 2015-10-19 10:20:53 +0100 |
commit | 631330482fdb30527bcecbc0fa6f41fa785e261c (patch) | |
tree | 424c1f80ba4f1d132200d555219ebba200e86160 | |
parent | 4ed0fe58579053a8f2728e1bcc5eba5dfd7cd47a (diff) | |
download | efl-631330482fdb30527bcecbc0fa6f41fa785e261c.tar.gz |
Eo: use correct mask when checking if an id is a class
-rw-r--r-- | src/lib/eo/eo.c | 3 | ||||
-rw-r--r-- | src/lib/eo/eo_ptr_indirection.x | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 3c7428f70c..fbae720ba9 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -153,8 +153,7 @@ _eo_is_a_class(const Eo *eo_id) if (!eo_id) return EINA_FALSE; oid = ((Eo_Header *) eo_id)->id; #endif - return ((((oid >> REF_TAG_SHIFT) & 0x1) == 0x0) && - (oid & MASK_CLASS_TAG)); + return (!(oid & MASK_OBJ_TAG) && (oid & MASK_CLASS_TAG)); } static inline _Eo_Class * diff --git a/src/lib/eo/eo_ptr_indirection.x b/src/lib/eo/eo_ptr_indirection.x index b92f29bc39..2faae7529e 100644 --- a/src/lib/eo/eo_ptr_indirection.x +++ b/src/lib/eo/eo_ptr_indirection.x @@ -419,7 +419,7 @@ _eo_id_allocate(const _Eo_Object *obj) #else Eo_Id ret = 0x1; (void) obj; - return ret << REF_TAG_SHIFT; + return MASK_OBJ_TAG; #endif } |