• 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: const StringPtr != ConstStringPtr
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: const StringPtr != ConstStringPtr


  • Subject: Re: const StringPtr != ConstStringPtr
  • From: Chris Espinosa <email@hidden>
  • Date: Tue, 10 Jan 2006 11:38:39 -0800

On Jan 10, 2006, at 10:30 AM, Steve Mills wrote:

During the conversion of our projects from CW to Xcode, I got errors on all calls that passed a constant string to functions that take a const StringPtr. If ConstStringPtr is a typedef of const unsigned char* and StringPtr is a typedef of unsigned char*, then why does Xcode (or gcc rather) think they're different?


void Func(const StringPtr s);


Func("\pblah"); <--error


Unheck the "Make Strings Read-Only" checkbox (which will pass the -fwritable-strings option) and then constness will be recognized correctly.  

Chris
 _______________________________________________
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: 
 >const StringPtr != ConstStringPtr (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: Xcode 2.2 and Intel
  • Next by Date: Re: Xcode 2.2 and Intel
  • Previous by thread: Re: const StringPtr != ConstStringPtr
  • Next by thread: Xcode 2.2 and Intel
  • Index(es):
    • Date
    • Thread