Re: How to use inline functions
Re: How to use inline functions
- Subject: Re: How to use inline functions
- From: Nick Zitzmann <email@hidden>
- Date: Thu, 13 Jan 2011 10:12:52 -0700
On Jan 13, 2011, at 8:21 AM, Oleg Krupnov wrote:
> I realize that my question has no relation to Cocoa, but it's still
> the place where I can get the fastest answer :)
>
> In several places in my app I check if the user has a valid license
> for my app. I'd like to make cracking the app somewhat more difficult
> and rather than calling -[license isValid], I want to call
> isLicenseValid(), and inline this function, so that the entire code of
> this function is duplicated in the binary in each place where I make
> the call to isLicenseValid().
>
> How should I declare the function in this case?
Consider using the CF_INLINE or FOUNDATION_STATIC_INLINE macros. See the definition of NSMakeRect() for an example.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden