• 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: How to use inline functions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >How to use inline functions (From: Oleg Krupnov <email@hidden>)

  • Prev by Date: data over USB to iPhone
  • Next by Date: QuickLook returning small image
  • Previous by thread: Re: How to use inline functions
  • Next by thread: data over USB to iPhone
  • Index(es):
    • Date
    • Thread