gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreBase toll-free bridging


From: David Chisnall
Subject: Re: CoreBase toll-free bridging
Date: Mon, 11 Mar 2013 17:07:46 +0000

On 11 Mar 2013, at 16:33, Stefan Bidi <address@hidden> wrote:

> You can just treat NSConstantString as an ObjC-only class and call the
> appropriate methods.  That's how this should work now, but I haven't
> really spent a lot of time testing it.
> 
> CFGetTypeID() is a complete hack, right now.  The code checks for
> cf->_typeID no matter what, and if doesn't match what the system
> thinks it should be calls the method -_cfTypeID, which in turn returns
> _kCFRuntimeNotATypeID for none CF types.

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]