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

_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to