Eo: use correct mask when checking if an id is a class

This commit is contained in:
Tom Hacohen 2015-10-12 16:27:55 +01:00
parent 44ca3a3669
commit 748b90d295
2 changed files with 2 additions and 3 deletions

View File

@ -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 *

View File

@ -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
}