Re: Inline C functions in Xcode 3
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