Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Port from Win to OSX with Inline functions



On Oct 6, 2006, at 8:37 PM, Chris Edgington wrote:

#define INLINER inline __attribute__((always_inline))

Here's how I do it:

#define STATIC_INLINE static inline
#define ALWAYS_INLINE(func) STATIC_INLINE func __attribute__ ((__always_inline__))


ALWAYS_INLINE(int addOne(int x));
STATIC_INLINE int addOne(int x)
{
    return x + 1;
}

--
Shaun Wexler
MacFOH
http://www.macfoh.com

"Things should be described as simply as possible, but no simpler." - Albert Einstein


_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >Port from Win to OSX with Inline functions (From: Chris Edgington <email@hidden>)
 >Re: Port from Win to OSX with Inline functions (From: John Francini <email@hidden>)
 >Re: Port from Win to OSX with Inline functions (From: Chris Edgington <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.