From 4e514a095696217cc59d0b58bb1a9a31d3e7dee0 Mon Sep 17 00:00:00 2001 From: Gabriel Pettier Date: Fri, 13 Mar 2015 18:41:24 +0100 Subject: [PATCH] determine pointer type tag value at compile time --- pyobjus/pyobjus_conversions.pxi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyobjus/pyobjus_conversions.pxi b/pyobjus/pyobjus_conversions.pxi index 24801f4..f6ac5a6 100644 --- a/pyobjus/pyobjus_conversions.pxi +++ b/pyobjus/pyobjus_conversions.pxi @@ -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 = ((( NSNumber.alloc().initWithInt(0)) & 0xf) >> 4) & 0xf + cdef is_tagged_pointer(void *_pointer): cdef unsigned long long pointer = _pointer