Re: SOLVED: CopyPascalStringToC generating EXC_BAD_ACCESS in new XCode project
Re: SOLVED: CopyPascalStringToC generating EXC_BAD_ACCESS in new XCode project
- Subject: Re: SOLVED: CopyPascalStringToC generating EXC_BAD_ACCESS in new XCode project
- From: Steve Christensen <email@hidden>
- Date: Fri, 31 Mar 2006 18:03:59 -0800
On Mar 31, 2006, at 5:32 PM, Roland Torres wrote:
I notice that CopyPascalStringToC results in an Xcode build warning:
warning: 'CopyPascalStringToC' is deprecated (declared at /System/
Library/Frameworks/CoreServices.framework/Frameworks/
CarbonCore.framework/Headers/TextUtils.h:598)
I'm using GetVoiceDescription, which is not deprecated, but returns
a struct with a Pascal string in it. The file Utils.h (mentioned in
the diagnostic message) states that CopyPascalStringToC is
available in version 10.0 and later in CoreServices.framework but
deprecated in 10.4. That was short-lived.
Not really. CopyPascalStringToC was available back in at least the OS
9 days (if not earlier), so it'd actually been around for awhile. The
headers now typically refer to availability in the OS X world, so
routines available in 10.0 have "always" been around.
So... what is the new function that replaces CopyPascalStringToC,
p2cstrcpy, and its cousins? Or are Pascal strings finally going the
way of the PPC?
Well, you could convert the Pascal string to a CFStringRef using
CFStringCreateWithPascalString, and then the string would be in a
more modern format.
steve
_______________________________________________
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