Re: CFRunLoopRef to NSRunLoop: how?
Re: CFRunLoopRef to NSRunLoop: how?
- Subject: Re: CFRunLoopRef to NSRunLoop: how?
- From: Maxthon Chan <email@hidden>
- Date: Sat, 22 Nov 2014 22:53:21 +0800
This library is designed to work with 3 implementations of Foundation with as few changes as possible: Appleās Cocoa (No CFRunLoop-to-NSRunLoop conversion), Cocotron (built with CFLite, designed their NSRunLoop as toll-free bridged class) and GNUstep (CoreFoundation, optional and not installed by default, is built on top of Foundation)
> On Nov 22, 2014, at 14:52, Ken Thomases <email@hidden> wrote:
>
> On Nov 22, 2014, at 12:43 AM, ChanMaxthon <email@hidden> wrote:
>
>> Given that Apple's Foundation does not support getting NSRunLoop from CFRunLoopRef, Cocotron designed CFRunLoop using toll-free bridging from NSRunLoop and GNUstep have a NSRunLoopFromCFRunLoop() (and GNUstep have some some NSRunLoop extensions allowing implementing this mess without fussing with CF.) function in their CoreFoundation implementation, is it safe to pass whatever object I got from the underlying framework over to the upper layer, with proper warning in the documentation?
>
> It's not clear what you're asking.
>
> CFRunLoop and NSRunLoop are _not_ toll-free bridged. If some code is written to expect an NSRunLoop, it is not safe to pass it a CFRunLoop.
>
> If the class's methods (designed to be overridden by subclasses) are written to take a CFRunLoop, all of your problems go away. Why are you working so hard to avoid using CFRunLoop?
>
> Regards,
> Ken
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden