summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2015-10-12 16:27:55 +0100
committerTom Hacohen <tom@stosb.com>2015-11-09 11:43:04 +0000
commit748b90d295f1d2dd9c6b02ed607e3cfa0f8b7a5d (patch)
tree8299839686683c1c37f04c294c33a4b5b20a7059
parent44ca3a366975d07a1dcb425dd21ba1073edfa3eb (diff)
Eo: use correct mask when checking if an id is a class
-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 7d9847fdea..6d5ea30f99 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 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)
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