Re: ARC conversion help - CFErrorRef* and NSError**
Re: ARC conversion help - CFErrorRef* and NSError**
- Subject: Re: ARC conversion help - CFErrorRef* and NSError**
- From: Alex Kac <email@hidden>
- Date: Mon, 29 Oct 2012 15:03:48 -0500
Aha, that's really interesting to know that's allowed. This doesn't seem like its covered in the ARC docs at all, that I could see anyhow. I'll try that. Thanks!
On Oct 29, 2012, at 2:56 PM, John McCall <email@hidden> wrote:
> You can use a temporary, as Ken suggests. Alternatively, in this case it's safe to use the NSError** directly as a CFErrorRef*, and while ARC can't reasonably know that and so prevents the cast, you can bypass that restriction by casting through void*:
> CFErrorRef* cfError = (CFErrorRef*) (void*) error;
>
> John.
_______________________________________________
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