• 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: UInt8 > NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UInt8 > NSString


  • Subject: Re: UInt8 > NSString
  • From: Chris Suter <email@hidden>
  • Date: Tue, 6 Mar 2007 10:56:17 +1100

yes, it helps:) as i wrote, i implemented the main-function as an obj-c method
of the class that was calling the function. this methods then calls the statically declared functions
and creates an NSString from the returned bytes. seems perfectly threadsafe.
(but i'll still need to study my kernighan and ritchie bible alot..)

It doesn't sound thread-safe to me.

If you're doing:

char *func ()
{
  static char buf[32];

  ...

  return buf;
}

- (NSString *)myMethod
{
  return [NSString stringWithUTF8String:func()];
}

it's not thread-safe.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >shortcut for selecting in NSPopUpButton (From: email@hidden)
 >UInt8 > NSString (From: arri <email@hidden>)
 >Re: UInt8 > NSString (From: Bob Smith <email@hidden>)
 >Re: UInt8 > NSString (From: arri <email@hidden>)

  • Prev by Date: Screensaver question
  • Next by Date: Question about Cocoa-Java Application
  • Previous by thread: Re: UInt8 > NSString
  • Next by thread: Re: UInt8 > NSString
  • Index(es):
    • Date
    • Thread