Re: UInt8 > NSString
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