Re: to __bridge or not to __bridge?
Re: to __bridge or not to __bridge?
- Subject: Re: to __bridge or not to __bridge?
- From: Jean-Denis MUYS <email@hidden>
- Date: Mon, 13 Feb 2012 15:56:31 +0000
- Thread-topic: to __bridge or not to __bridge?
On 13 févr. 2012, at 16:26, Thomas Clement wrote:
> Doc says: "The compiler understands Objective-C methods that return Core Foundation types follow the historical Cocoa naming conventions"
> This applies to case 1, not case 2.
>
Tadaa! This is it. If the CF type is not the variable, but the result of a Objective-C method, then the compiler refrains from complaining. I checked that this is the case for *any* Objective-C method, including @property getters. I also checked that the compiler will refrain from complaining even if the type is not a Core Foundation type, but a pointer to any C struct. So it seems that (at least currently), this sentence could be rewritten:
> "The compiler **assumes** that **any** Objective-C methods that return **any pointers to struct** types follow the historical Cocoa naming conventions"
Though of course, this compiler leniency cannot safely be assumed to last.
Thanks for the pointer.
Jean-Denis
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden