|
From: | Luboš Doležel |
Subject: | Re: CoreBase toll-free bridging |
Date: | Mon, 11 Mar 2013 18:43:53 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 |
On 03/11/2013 06:07 PM, David Chisnall wrote:
As I recall, on OS X the isa pointer for bridged types contains the typeid. The Objective-C runtime has some extra logic that checks if the isa pointer is <= 0xffff and, if so, looks up the class from a table. The open source CFLite stuff doesn't have this. David
They actually use this: #pragma pack(1) struct apple_cfstring { void* isa; uint8_t flags; uint8_t typeID; uint8_t unused[2]; #ifdef __x86_64__ uint32_t extraFlags; #endif void* data; unsigned long length; }; #pragma pack() So isa is kept separately from typeID. -- Luboš Doležel
[Prev in Thread] | Current Thread | [Next in Thread] |