• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: to __bridge or not to __bridge?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: to __bridge or not to __bridge?
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >to __bridge or not to __bridge? (From: Jean-Denis MUYS <email@hidden>)
 >Re: to __bridge or not to __bridge? (From: Thomas Clement <email@hidden>)

  • Prev by Date: Re: to __bridge or not to __bridge?
  • Next by Date: Re: to __bridge or not to __bridge?
  • Previous by thread: Re: to __bridge or not to __bridge?
  • Next by thread: Re: to __bridge or not to __bridge?
  • Index(es):
    • Date
    • Thread