determine pointer type tag value at compile time

This commit is contained in:
Gabriel Pettier 2015-03-13 18:41:24 +01:00
parent a0c663cdb0
commit 4e514a0956
1 changed files with 2 additions and 2 deletions

View File

@ -184,8 +184,8 @@ cdef convert_to_cy_cls_instance(id ret_id, main_cls_name=None):
# Tagged pointers
ctypedef enum:
kCFTaggedObjectID_Integer = (1 << 1) + 1
kCFTaggedObjectID_Integer = (((<unsigned long long> NSNumber.alloc().initWithInt(0)) & 0xf) >> 4) & 0xf
cdef is_tagged_pointer(void *_pointer):
cdef unsigned long long pointer = <unsigned long long>_pointer