OSX compat tweaks

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32323 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2011-02-23 11:52:17 +00:00
parent e3a0b4cab8
commit c0674078c9
19 changed files with 60 additions and 31 deletions

View file

@ -33,6 +33,7 @@
#import "GNUstepBase/GSLock.h"
#import "Foundation/NSArray.h"
#import "Foundation/NSData.h"
#import "Foundation/NSDictionary.h"
#import "Foundation/NSLock.h"
#import "Foundation/NSNotification.h"
#import "Foundation/NSNotificationQueue.h"
@ -878,13 +879,14 @@ static jbuf_type *
jbuf()
{
NSMutableData *d;
NSMutableDictionary *dict;
d = [[[NSThread currentThread] threadDictionary] objectForKey: @"GSjbuf"];
dict = [[NSThread currentThread] threadDictionary];
d = [dict objectForKey: @"GSjbuf"];
if (d == nil)
{
d = [[NSMutableData alloc] initWithLength: sizeof(jbuf_type)];
[[[NSThread currentThread] threadDictionary] setObject: d
forKey: @"GSjbuf"];
[dict setObject: d forKey: @"GSjbuf"];
RELEASE(d);
}
return (jbuf_type*)[d mutableBytes];