• 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: Info.plist preprocessor macro expansion, space between tokens
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Info.plist preprocessor macro expansion, space between tokens


  • Subject: RE: Info.plist preprocessor macro expansion, space between tokens
  • From: "Alex Sheh" <email@hidden>
  • Date: Wed, 17 May 2006 20:00:31 -0700
  • Thread-topic: Info.plist preprocessor macro expansion, space between tokens

Title: Re: Info.plist preprocessor macro expansion, space between tokens
Thanks, Robert, that works perfectly!
 
- Alex


From: xcode-users-bounces+asheh=email@hidden [mailto:xcode-users-bounces+asheh=email@hidden] On Behalf Of Robert J. Lang
Sent: Tuesday, May 16, 2006 12:57 PM
To: XCode Users List
Subject: Re: Info.plist preprocessor macro expansion, space between tokens

on 4/28/06 4:49 PM, Alex Sheh at email@hidden wrote:

Hi all,
Is there anyway to get the Info.plist preprocessor NOT to add whitespace between tokens during macro expansion?

This works. The two-stage construction does the trick.
Robert


#define VERSION_MAJOR 4
#define VERSION_MINOR 0
#define VERSION_BUGFIX 0

/* Symbols needed for Info.plist; ugly multistage construction because
  they need to be symbols, not strings, no quotes, no whitespace */
#define MACRO_PASTE_5(a, b, c, d, e) a##b##c##d##e
#define MACRO_PASTE_5A(a, b, c, d, e) MACRO_PASTE_5(a, b, c, d, e)
#define MAC_CFBUNDLE_SHORT_VERSION_STRING \
  MACRO_PASTE_5A(VERSION_MAJOR, ., VERSION_MINOR, ., VERSION_BUGFIX)

The symbol MAC_CFBUNDLE_SHORT_VERSION_STRING now gives the desired result and can be used in your Info.plist.
 _______________________________________________
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: Info.plist preprocessor macro expansion, space between tokens
      • From: Greg Hurrell <email@hidden>
  • Prev by Date: Re: dead-code stripping, pass two...
  • Next by Date: Re: Find Fast
  • Previous by thread: Re: Info.plist preprocessor macro expansion, space between tokens
  • Next by thread: Re: Info.plist preprocessor macro expansion, space between tokens
  • Index(es):
    • Date
    • Thread