summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2015-10-12 16:27:55 +0100
committerTom Hacohen <tom@stosb.com>2015-10-19 10:20:53 +0100
commit631330482fdb30527bcecbc0fa6f41fa785e261c (patch)
tree424c1f80ba4f1d132200d555219ebba200e86160 /src
parent4ed0fe58579053a8f2728e1bcc5eba5dfd7cd47a (diff)
Eo: use correct mask when checking if an id is a class
Diffstat (limited to 'src')
-rw-r--r--src/lib/eo/eo.c3
-rw-r--r--src/lib/eo/eo_ptr_indirection.x2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 3c7428f..fbae720 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)
153 if (!eo_id) return EINA_FALSE; 153 if (!eo_id) return EINA_FALSE;
154 oid = ((Eo_Header *) eo_id)->id; 154 oid = ((Eo_Header *) eo_id)->id;
155#endif 155#endif
156 return ((((oid >> REF_TAG_SHIFT) & 0x1) == 0x0) && 156 return (!(oid & MASK_OBJ_TAG) && (oid & MASK_CLASS_TAG));
157 (oid & MASK_CLASS_TAG));
158} 157}
159 158
160static inline _Eo_Class * 159static inline _Eo_Class *
diff --git a/src/lib/eo/eo_ptr_indirection.x b/src/lib/eo/eo_ptr_indirection.x
index b92f29b..2faae75 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)
419#else 419#else
420 Eo_Id ret = 0x1; 420 Eo_Id ret = 0x1;
421 (void) obj; 421 (void) obj;
422 return ret << REF_TAG_SHIFT; 422 return MASK_OBJ_TAG;
423#endif 423#endif
424} 424}
425 425