• 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: Pascal String Woes ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pascal String Woes ...


  • Subject: Re: Pascal String Woes ...
  • From: Karl Kuehn <email@hidden>
  • Date: Wed, 11 Feb 2004 16:33:06 -0500

Um... Not having done much of anything in Core Foundation... don't you have to initialize the buffers strAPtr and strBPtr?

Karl Kuehn
email@hidden

On Feb 11, 2004, at 3:34 PM, J Nozzi wrote:

Okay, I admit that my standard C knowledge is severely lacking here. I've been *meaning* to read the $50 books I bought, really I have. ;-) In the mean time, the following code dies at the indicated line (// DIES HERE) with a SIGSEGV / EXEC_BAD_ACCESS.

NSString * strA = [preferences objectForKey:@"contentsa"];
NSString * strB = [preferences objectForKey:@"contentsb"];
StringPtr strAPtr;
StringPtr strBPtr;

CFStringGetPascalString((CFStringRef) strA, strAPtr, 256, kCFStringEncodingASCII); // DIES HERE
CFStringGetPascalString((CFStringRef) strB, strBPtr, 256, kCFStringEncodingASCII);

... any takers?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Pascal String Woes ... (From: J Nozzi <email@hidden>)

  • Prev by Date: is this enough for a singleton? (for a class cluster "placeholder")
  • Next by Date: Re: Pascal String Woes ...
  • Previous by thread: Re: Pascal String Woes ...
  • Next by thread: RE: Pascal String Woes ...
  • Index(es):
    • Date
    • Thread