• 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: Bizzarre CFSTR behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bizzarre CFSTR behavior


  • Subject: Re: Bizzarre CFSTR behavior
  • From: "Finlay Dobbie" <email@hidden>
  • Date: Fri, 4 Jan 2008 17:00:13 +0000

On Jan 4, 2008 7:26 AM, Luigi Castelli <email@hidden> wrote:
> If I write:
>
> const char *kString = "hello";
> CFStringRef cfString = CFSTR(kString);
>
> Xcode doesn't compile the above code and gives me a parse error.
>
> but if I write:
>
> CFStringRef cfString = CFSTR("hello");
>
> then, no problem.
>
> Can anybody explain ?

CFSTR() is basically a compiler builtin - it is magic and operates
directly on literal strings rather than const char *.

 -- Finlay
 _______________________________________________
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

References: 
 >Bizzarre CFSTR behavior (From: Luigi Castelli <email@hidden>)

  • Prev by Date: Re: Bizzarre CFSTR behavior
  • Next by Date: Re: build problems with multiple targets
  • Previous by thread: Re: Bizzarre CFSTR behavior
  • Next by thread: Re: Bizzarre CFSTR behavior
  • Index(es):
    • Date
    • Thread