• 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: Inline C functions in Xcode 3
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inline C functions in Xcode 3


  • Subject: Re: Inline C functions in Xcode 3
  • From: Eric Albert <email@hidden>
  • Date: Sat, 03 Nov 2007 13:59:01 -0700

On Nov 3, 2007, at 9:43 AM, Michael Nickerson wrote:

On Nov 2, 2007, at 10:36 PM, Nick Zitzmann wrote:

On Nov 2, 2007, at 8:08 PM, David Riggle wrote:

My inline C functions that compiled fine under Xcode 2.4 are giving me errors in Xcode 3. I use C99 mode. I want to declare the functions in a .h and implement them in a .c. Is that still possible? If so, which magic incantations of inline, static inline, or extern inline do I need to use?

If your project links to the Foundation framework, then I've found that using FOUNDATION_STATIC_INLINE works for inline functions.

There's also CF_INLINE from the CoreFoundation framework, which is actually declared as static even though the defined name doesn't include it.

I'd strongly advise against using either FOUNDATION_STATIC_INLINE or CF_INLINE. Neither is supported for anything other than Foundation or CF's uses. They may work for you, but the Foundation and CF engineers may change them at any point.


That said, they're just #defines. You can copy their implementations into your own headers.

-Eric

_______________________________________________
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: Inline C functions in Xcode 3
      • From: Steve Checkoway <email@hidden>
References: 
 >Inline C functions in Xcode 3 (From: David Riggle <email@hidden>)
 >Re: Inline C functions in Xcode 3 (From: Nick Zitzmann <email@hidden>)
 >Re: Inline C functions in Xcode 3 (From: Michael Nickerson <email@hidden>)

  • Prev by Date: Re: Xcode 3 SCM Preference Pane Documentation
  • Next by Date: Re: Problems wih xib
  • Previous by thread: Re: Inline C functions in Xcode 3
  • Next by thread: Re: Inline C functions in Xcode 3
  • Index(es):
    • Date
    • Thread