mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-03 13:21:00 +00:00
avoid compiler warnings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32417 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6641e12d91
commit
aa5229a6cb
31 changed files with 201 additions and 163 deletions
34
ChangeLog
34
ChangeLog
|
@ -1,3 +1,37 @@
|
||||||
|
2011-02-28 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSTimeZone.m:
|
||||||
|
* Source/NSPortCoder.m:
|
||||||
|
* Source/NSBundle.m:
|
||||||
|
* Source/NSPropertyList.m:
|
||||||
|
* Source/NSDistributedNotificationCenter.m:
|
||||||
|
* Source/NSProcessInfo.m:
|
||||||
|
* Source/NSRunLoop.m:
|
||||||
|
* Source/NSOperation.m:
|
||||||
|
* Source/NSUserDefaults.m:
|
||||||
|
* Source/GSArray.m:
|
||||||
|
* Source/NSMessagePortNameServer.m:
|
||||||
|
* Source/NSKeyedArchiver.m:
|
||||||
|
* Source/NSDebug.m:
|
||||||
|
* Source/NSPort.m:
|
||||||
|
* Source/NSMessagePort.m:
|
||||||
|
* Source/win32/NSMessagePortNameServer.m:
|
||||||
|
* Source/NSFileManager.m:
|
||||||
|
* Source/NSException.m:
|
||||||
|
* Source/NSString.m:
|
||||||
|
* Source/Additions/NSData+GNUstepBase.m:
|
||||||
|
* Source/Additions/GSMime.m:
|
||||||
|
* Source/Additions/NSCalendarDate+GNUstepBase.m:
|
||||||
|
* Source/Additions/GSXML.m:
|
||||||
|
* Source/Additions/GSObjCRuntime.m:
|
||||||
|
* Source/GSSet.m:
|
||||||
|
* Source/NSConnection.m:
|
||||||
|
* Source/NSThread.m:
|
||||||
|
* Source/GSeq.h:
|
||||||
|
* Source/NSLog.m:
|
||||||
|
* Source/NSTask.m:
|
||||||
|
Tweaks to avoid compiler warnings in garbage collecting environment.
|
||||||
|
|
||||||
2011-02-27 Richard Frith-Macdonald <rfm@gnu.org>
|
2011-02-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Tests/GNUmakefile: Use gnustep-make to supply targets.
|
* Tests/GNUmakefile: Use gnustep-make to supply targets.
|
||||||
|
|
|
@ -5418,17 +5418,17 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
|
||||||
{
|
{
|
||||||
NSMutableArray *partData = nil;
|
NSMutableArray *partData = nil;
|
||||||
NSMutableData *md = [NSMutableData dataWithCapacity: 1024];
|
NSMutableData *md = [NSMutableData dataWithCapacity: 1024];
|
||||||
NSData *d = nil;
|
NSData *d = nil;
|
||||||
NSEnumerator *enumerator;
|
NSEnumerator *enumerator;
|
||||||
GSMimeHeader *type;
|
GSMimeHeader *type;
|
||||||
GSMimeHeader *enc;
|
GSMimeHeader *enc;
|
||||||
GSMimeHeader *hdr;
|
GSMimeHeader *hdr;
|
||||||
NSData *boundary = 0;
|
NSData *boundary = 0;
|
||||||
BOOL contentIsBinary = NO;
|
BOOL contentIsBinary = NO;
|
||||||
BOOL contentIs7bit = YES;
|
BOOL contentIs7bit = YES;
|
||||||
NSUInteger count;
|
NSUInteger count;
|
||||||
NSUInteger i;
|
NSUInteger i;
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
|
|
||||||
if (isOuter == YES)
|
if (isOuter == YES)
|
||||||
{
|
{
|
||||||
|
@ -5865,7 +5865,7 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
|
||||||
[md appendData: d];
|
[md appendData: d];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
return md;
|
return md;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5960,9 +5960,9 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
|
||||||
type: (NSString*)type
|
type: (NSString*)type
|
||||||
name: (NSString*)name
|
name: (NSString*)name
|
||||||
{
|
{
|
||||||
NSString *subtype = nil;
|
NSString *subtype = nil;
|
||||||
GSMimeHeader *hdr = nil;
|
GSMimeHeader *hdr = nil;
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
|
|
||||||
if (type == nil)
|
if (type == nil)
|
||||||
{
|
{
|
||||||
|
@ -6028,7 +6028,7 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
|
||||||
|
|
||||||
[self setContent: newContent];
|
[self setContent: newContent];
|
||||||
[self setHeader: hdr];
|
[self setHeader: hdr];
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6040,10 +6040,10 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
|
||||||
*/
|
*/
|
||||||
- (void) setContentType: (NSString *)newType
|
- (void) setContentType: (NSString *)newType
|
||||||
{
|
{
|
||||||
GSMimeHeader *hdr = nil;
|
GSMimeHeader *hdr = nil;
|
||||||
GSMimeParser *p;
|
GSMimeParser *p;
|
||||||
NSScanner *scanner;
|
NSScanner *scanner;
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
|
|
||||||
p = AUTORELEASE([GSMimeParser new]);
|
p = AUTORELEASE([GSMimeParser new]);
|
||||||
scanner = [NSScanner scannerWithString: newType];
|
scanner = [NSScanner scannerWithString: newType];
|
||||||
|
@ -6055,7 +6055,7 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
|
||||||
format: @"Unable to parse type information"];
|
format: @"Unable to parse type information"];
|
||||||
}
|
}
|
||||||
[self setHeader: hdr];
|
[self setHeader: hdr];
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6704,7 +6704,7 @@ GS_PRIVATE_INTERNAL(GSMimeSMTPClient)
|
||||||
{
|
{
|
||||||
NS_DURING
|
NS_DURING
|
||||||
{
|
{
|
||||||
RETAIN(self); // Make sure we don't get released until done.
|
[self retain]; // Make sure we don't get released until done.
|
||||||
|
|
||||||
/* First perform all reads ... so we process incoming data,
|
/* First perform all reads ... so we process incoming data,
|
||||||
*/
|
*/
|
||||||
|
@ -6830,7 +6830,7 @@ GS_PRIVATE_INTERNAL(GSMimeSMTPClient)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RELEASE(self);
|
[self release];
|
||||||
}
|
}
|
||||||
NS_HANDLER
|
NS_HANDLER
|
||||||
{
|
{
|
||||||
|
@ -7206,8 +7206,8 @@ GS_PRIVATE_INTERNAL(GSMimeSMTPClient)
|
||||||
port: pnum
|
port: pnum
|
||||||
inputStream: &internal->istream
|
inputStream: &internal->istream
|
||||||
outputStream: &internal->ostream];
|
outputStream: &internal->ostream];
|
||||||
RETAIN(internal->istream);
|
[internal->istream retain];
|
||||||
RETAIN(internal->ostream);
|
[internal->ostream retain];
|
||||||
if (internal->istream == nil || internal->ostream == nil)
|
if (internal->istream == nil || internal->ostream == nil)
|
||||||
{
|
{
|
||||||
NSLog(@"Unable to connect to %@:%@", n, p);
|
NSLog(@"Unable to connect to %@:%@", n, p);
|
||||||
|
|
|
@ -1956,11 +1956,11 @@ GSPrintf (FILE *fptr, NSString* format, ...)
|
||||||
{
|
{
|
||||||
static Class stringClass = 0;
|
static Class stringClass = 0;
|
||||||
static NSStringEncoding enc;
|
static NSStringEncoding enc;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
NSString *message;
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
NSData *data;
|
NSString *message;
|
||||||
BOOL ok = NO;
|
NSData *data;
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
BOOL ok = NO;
|
||||||
|
|
||||||
if (stringClass == 0)
|
if (stringClass == 0)
|
||||||
{
|
{
|
||||||
|
@ -1976,7 +1976,7 @@ GSPrintf (FILE *fptr, NSString* format, ...)
|
||||||
{
|
{
|
||||||
data = [message dataUsingEncoding: NSUTF8StringEncoding];
|
data = [message dataUsingEncoding: NSUTF8StringEncoding];
|
||||||
}
|
}
|
||||||
RELEASE(message);
|
[message release];
|
||||||
|
|
||||||
if (data != nil)
|
if (data != nil)
|
||||||
{
|
{
|
||||||
|
@ -1987,7 +1987,7 @@ GSPrintf (FILE *fptr, NSString* format, ...)
|
||||||
ok = YES;
|
ok = YES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1746,7 +1746,7 @@ static NSString *endMarker = @"At end of incremental parse";
|
||||||
* Creation of a new Parser by calling
|
* Creation of a new Parser by calling
|
||||||
* -initWithSAXHandler:withContentsOfFile:
|
* -initWithSAXHandler:withContentsOfFile:
|
||||||
* <example>
|
* <example>
|
||||||
* CREATE_AUTORELEASE_POOL(arp);
|
* NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
* GSSAXHandler *h = [GSDebugSAXHandler handler];
|
* GSSAXHandler *h = [GSDebugSAXHandler handler];
|
||||||
* GSXMLParser *p = [GSXMLParser parserWithSAXHandler: h
|
* GSXMLParser *p = [GSXMLParser parserWithSAXHandler: h
|
||||||
* withContentsOfFile: @"macos.xml"];
|
* withContentsOfFile: @"macos.xml"];
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
*/
|
*/
|
||||||
if (dayOfWeek != 4)
|
if (dayOfWeek != 4)
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
NSCalendarDate *thursday;
|
NSCalendarDate *thursday;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
minutes: 0
|
minutes: 0
|
||||||
seconds: 0];
|
seconds: 0];
|
||||||
dayOfYear = [thursday dayOfYear];
|
dayOfYear = [thursday dayOfYear];
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -90,14 +90,14 @@
|
||||||
*/
|
*/
|
||||||
- (id) initWithHexadecimalRepresentation: (NSString*)string
|
- (id) initWithHexadecimalRepresentation: (NSString*)string
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
NSData *d;
|
NSData *d;
|
||||||
const char *src;
|
const char *src;
|
||||||
const char *end;
|
const char *end;
|
||||||
unsigned char *dst;
|
unsigned char *dst;
|
||||||
unsigned int pos = 0;
|
unsigned int pos = 0;
|
||||||
unsigned char byte = 0;
|
unsigned char byte = 0;
|
||||||
BOOL high = NO;
|
BOOL high = NO;
|
||||||
|
|
||||||
d = [string dataUsingEncoding: NSASCIIStringEncoding
|
d = [string dataUsingEncoding: NSASCIIStringEncoding
|
||||||
allowLossyConversion: YES];
|
allowLossyConversion: YES];
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
DESTROY(self);
|
DESTROY(self);
|
||||||
}
|
}
|
||||||
NSZoneFree(NSDefaultMallocZone(), dst);
|
NSZoneFree(NSDefaultMallocZone(), dst);
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
if (self == nil)
|
if (self == nil)
|
||||||
{
|
{
|
||||||
[NSException raise: NSInvalidArgumentException
|
[NSException raise: NSInvalidArgumentException
|
||||||
|
|
|
@ -723,7 +723,7 @@ static Class GSInlineArrayClass;
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
_contents_array[_count] = 0;
|
_contents_array[_count] = 0;
|
||||||
RELEASE(obj); /* Adjust array BEFORE releasing object. */
|
[obj release]; /* Adjust array BEFORE releasing object. */
|
||||||
_version++;
|
_version++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -788,9 +788,9 @@ static Class GSInlineArrayClass;
|
||||||
* array in case a retain or release causes an exception.
|
* array in case a retain or release causes an exception.
|
||||||
*/
|
*/
|
||||||
obj = _contents_array[index];
|
obj = _contents_array[index];
|
||||||
IF_NO_GC(RETAIN(anObject));
|
[anObject retain];
|
||||||
_contents_array[index] = anObject;
|
_contents_array[index] = anObject;
|
||||||
RELEASE(obj);
|
[obj release];
|
||||||
_version++;
|
_version++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -116,10 +116,6 @@ static Class mutableSetClass;
|
||||||
{
|
{
|
||||||
if (self == [GSSet class])
|
if (self == [GSSet class])
|
||||||
{
|
{
|
||||||
arrayClass = [NSArray class];
|
|
||||||
setClass = [GSSet class];
|
|
||||||
mutableSetClass = [GSMutableSet class];
|
|
||||||
memberSel = @selector(member:);
|
|
||||||
#if GS_WITH_GC
|
#if GS_WITH_GC
|
||||||
/* We create a typed memory descriptor for map nodes.
|
/* We create a typed memory descriptor for map nodes.
|
||||||
* Only the pointer to the key needs to be scanned.
|
* Only the pointer to the key needs to be scanned.
|
||||||
|
@ -128,6 +124,10 @@ static Class mutableSetClass;
|
||||||
GC_set_bit(w, GC_WORD_OFFSET(GSIMapNode_t, key));
|
GC_set_bit(w, GC_WORD_OFFSET(GSIMapNode_t, key));
|
||||||
nodeDesc = GC_make_descriptor(w, GC_WORD_LEN(GSIMapNode_t));
|
nodeDesc = GC_make_descriptor(w, GC_WORD_LEN(GSIMapNode_t));
|
||||||
#endif
|
#endif
|
||||||
|
arrayClass = [NSArray class];
|
||||||
|
setClass = [GSSet class];
|
||||||
|
mutableSetClass = [GSMutableSet class];
|
||||||
|
memberSel = @selector(member:);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -598,7 +598,6 @@ GSEQ_STRRANGE(NSString *ss, NSString *os, unsigned mask, NSRange aRange)
|
||||||
{
|
{
|
||||||
GSEQ_ST s = (GSEQ_ST)ss;
|
GSEQ_ST s = (GSEQ_ST)ss;
|
||||||
GSEQ_OT o = (GSEQ_OT)os;
|
GSEQ_OT o = (GSEQ_OT)os;
|
||||||
unsigned myLength;
|
|
||||||
unsigned myIndex;
|
unsigned myIndex;
|
||||||
unsigned myEndIndex;
|
unsigned myEndIndex;
|
||||||
unsigned strLength;
|
unsigned strLength;
|
||||||
|
@ -617,10 +616,10 @@ GSEQ_STRRANGE(NSString *ss, NSString *os, unsigned mask, NSRange aRange)
|
||||||
NSRange (*orImp)(NSString*, SEL, unsigned);
|
NSRange (*orImp)(NSString*, SEL, unsigned);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Check that the search range is reasonable */
|
|
||||||
myLength = GSEQ_SLEN;
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
/* Check that the search range is reasonable */
|
||||||
|
unsigned myLength = GSEQ_SLEN;
|
||||||
|
|
||||||
/* Range should be checked in calling code */
|
/* Range should be checked in calling code */
|
||||||
if (aRange.location > myLength)
|
if (aRange.location > myLength)
|
||||||
[NSException raise: NSRangeException format: @"Invalid location."];
|
[NSException raise: NSRangeException format: @"Invalid location."];
|
||||||
|
|
|
@ -1904,9 +1904,9 @@ IF_NO_GC(
|
||||||
inDirectory: (NSString*)subPath
|
inDirectory: (NSString*)subPath
|
||||||
forLocalization: (NSString*)localizationName
|
forLocalization: (NSString*)localizationName
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
NSString *result = nil;
|
NSString *result = nil;
|
||||||
NSArray *array;
|
NSArray *array;
|
||||||
|
|
||||||
if ([ext length] == 0)
|
if ([ext length] == 0)
|
||||||
{
|
{
|
||||||
|
@ -1937,8 +1937,9 @@ IF_NO_GC(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
IF_NO_GC([result retain]; DESTROY(arp);)
|
[result retain];
|
||||||
return AUTORELEASE(result);
|
[arp release];
|
||||||
|
return [result autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (NSArray *) preferredLocalizationsFromArray: (NSArray *)localizationsArray
|
+ (NSArray *) preferredLocalizationsFromArray: (NSArray *)localizationsArray
|
||||||
|
|
|
@ -634,8 +634,6 @@ static NSLock *cached_proxies_gate = nil;
|
||||||
{
|
{
|
||||||
NSNotificationCenter *nc;
|
NSNotificationCenter *nc;
|
||||||
|
|
||||||
GSMakeWeakPointer(self, "delegate");
|
|
||||||
|
|
||||||
#if GS_WITH_GC
|
#if GS_WITH_GC
|
||||||
/* We create a typed memory descriptor for map nodes.
|
/* We create a typed memory descriptor for map nodes.
|
||||||
* FIXME
|
* FIXME
|
||||||
|
@ -645,6 +643,8 @@ static NSLock *cached_proxies_gate = nil;
|
||||||
GC_set_bit(w, GC_WORD_OFFSET(GSIMapNode_t, value));
|
GC_set_bit(w, GC_WORD_OFFSET(GSIMapNode_t, value));
|
||||||
nodeDesc = GC_make_descriptor(w, GC_WORD_LEN(GSIMapNode_t));
|
nodeDesc = GC_make_descriptor(w, GC_WORD_LEN(GSIMapNode_t));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
GSMakeWeakPointer(self, "delegate");
|
||||||
connectionClass = self;
|
connectionClass = self;
|
||||||
dateClass = [NSDate class];
|
dateClass = [NSDate class];
|
||||||
distantObjectClass = [NSDistantObject class];
|
distantObjectClass = [NSDistantObject class];
|
||||||
|
@ -708,17 +708,17 @@ static NSLock *cached_proxies_gate = nil;
|
||||||
+ (NSDistantObject*) rootProxyForConnectionWithRegisteredName: (NSString*)n
|
+ (NSDistantObject*) rootProxyForConnectionWithRegisteredName: (NSString*)n
|
||||||
host: (NSString*)h
|
host: (NSString*)h
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
NSConnection *connection;
|
NSConnection *connection;
|
||||||
NSDistantObject *proxy = nil;
|
NSDistantObject *proxy = nil;
|
||||||
|
|
||||||
connection = [self connectionWithRegisteredName: n host: h];
|
connection = [self connectionWithRegisteredName: n host: h];
|
||||||
if (connection != nil)
|
if (connection != nil)
|
||||||
{
|
{
|
||||||
proxy = RETAIN([connection rootProxy]);
|
proxy = [[connection rootProxy] retain];
|
||||||
}
|
}
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
return AUTORELEASE(proxy);
|
return [proxy autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -734,7 +734,7 @@ static NSLock *cached_proxies_gate = nil;
|
||||||
+ (NSDistantObject*) rootProxyForConnectionWithRegisteredName: (NSString*)n
|
+ (NSDistantObject*) rootProxyForConnectionWithRegisteredName: (NSString*)n
|
||||||
host: (NSString*)h usingNameServer: (NSPortNameServer*)s
|
host: (NSString*)h usingNameServer: (NSPortNameServer*)s
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
NSConnection *connection;
|
NSConnection *connection;
|
||||||
NSDistantObject *proxy = nil;
|
NSDistantObject *proxy = nil;
|
||||||
|
|
||||||
|
@ -745,7 +745,7 @@ static NSLock *cached_proxies_gate = nil;
|
||||||
{
|
{
|
||||||
proxy = RETAIN([connection rootProxy]);
|
proxy = RETAIN([connection rootProxy]);
|
||||||
}
|
}
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
return AUTORELEASE(proxy);
|
return AUTORELEASE(proxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1305,12 +1305,12 @@ static NSLock *cached_proxies_gate = nil;
|
||||||
* is done before the deallocation completes.
|
* is done before the deallocation completes.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter]
|
[[NSNotificationCenter defaultCenter]
|
||||||
postNotificationName: NSConnectionDidDieNotification
|
postNotificationName: NSConnectionDidDieNotification
|
||||||
object: self];
|
object: self];
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1885,7 +1885,7 @@ static NSLock *cached_proxies_gate = nil;
|
||||||
|
|
||||||
- (void) finalize
|
- (void) finalize
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
|
|
||||||
if (debug_connection)
|
if (debug_connection)
|
||||||
NSLog(@"finalising %@", self);
|
NSLog(@"finalising %@", self);
|
||||||
|
@ -1950,7 +1950,7 @@ static NSLock *cached_proxies_gate = nil;
|
||||||
|
|
||||||
DESTROY(IrefGate);
|
DESTROY(IrefGate);
|
||||||
|
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -683,7 +683,7 @@ _GSDebugAllocationRemove(Class c, id o)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[uniqueLock unlock];
|
[uniqueLock unlock];
|
||||||
RELEASE(tag);
|
[tag release];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1088,7 +1088,7 @@ NSMutableArray *
|
||||||
GSPrivateStackAddresses(void)
|
GSPrivateStackAddresses(void)
|
||||||
{
|
{
|
||||||
NSMutableArray *stack;
|
NSMutableArray *stack;
|
||||||
NSAutoreleasePool *pool;
|
NSAutoreleasePool *pool;
|
||||||
|
|
||||||
#if HAVE_BACKTRACE
|
#if HAVE_BACKTRACE
|
||||||
void *addresses[1024];
|
void *addresses[1024];
|
||||||
|
@ -1182,7 +1182,7 @@ GSPrivateStackAddresses(void)
|
||||||
signal(SIGBUS, env->bus);
|
signal(SIGBUS, env->bus);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
RELEASE(pool);
|
[pool release];
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -736,13 +736,14 @@ static NSDistributedNotificationCenter *netCenter = nil;
|
||||||
limit = [NSDate dateWithTimeIntervalSinceNow: 5.0];
|
limit = [NSDate dateWithTimeIntervalSinceNow: 5.0];
|
||||||
while (_remote == nil && [limit timeIntervalSinceNow] > 0)
|
while (_remote == nil && [limit timeIntervalSinceNow] > 0)
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(pool);
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
|
|
||||||
[NSThread sleepForTimeInterval: 0.05];
|
[NSThread sleepForTimeInterval: 0.05];
|
||||||
_remote = [NSConnection
|
_remote = [NSConnection
|
||||||
rootProxyForConnectionWithRegisteredName: service
|
rootProxyForConnectionWithRegisteredName: service
|
||||||
host: host usingNameServer: ns];
|
host: host usingNameServer: ns];
|
||||||
IF_NO_GC([_remote retain];)
|
[_remote retain];
|
||||||
IF_NO_GC(DESTROY(pool);)
|
[pool release];
|
||||||
}
|
}
|
||||||
if (_remote == nil)
|
if (_remote == nil)
|
||||||
{
|
{
|
||||||
|
|
|
@ -759,7 +759,8 @@ static void _terminate()
|
||||||
static void
|
static void
|
||||||
_NSFoundationUncaughtExceptionHandler (NSException *exception)
|
_NSFoundationUncaughtExceptionHandler (NSException *exception)
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(pool);
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
|
|
||||||
fprintf(stderr, "%s: Uncaught exception %s, reason: %s\n",
|
fprintf(stderr, "%s: Uncaught exception %s, reason: %s\n",
|
||||||
GSPrivateArgZero(),
|
GSPrivateArgZero(),
|
||||||
[[exception name] lossyCString], [[exception reason] lossyCString]);
|
[[exception name] lossyCString], [[exception reason] lossyCString]);
|
||||||
|
@ -770,7 +771,7 @@ _NSFoundationUncaughtExceptionHandler (NSException *exception)
|
||||||
[[[exception _callStack] description] lossyCString]);
|
[[[exception _callStack] description] lossyCString]);
|
||||||
}
|
}
|
||||||
fflush(stderr); /* NEEDED UNDER MINGW */
|
fflush(stderr); /* NEEDED UNDER MINGW */
|
||||||
RELEASE(pool);
|
[pool release];
|
||||||
_terminate();
|
_terminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -907,8 +908,8 @@ callUncaughtHandler(id value)
|
||||||
|
|
||||||
- (NSString*) description
|
- (NSString*) description
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(pool);
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
NSString *result;
|
NSString *result;
|
||||||
|
|
||||||
if (_e_name == nil)
|
if (_e_name == nil)
|
||||||
{
|
{
|
||||||
|
@ -945,9 +946,9 @@ callUncaughtHandler(id value)
|
||||||
result = [NSString stringWithFormat: @"%@ NAME:%@ REASON:%@",
|
result = [NSString stringWithFormat: @"%@ NAME:%@ REASON:%@",
|
||||||
[super description], _e_name, _e_reason];
|
[super description], _e_name, _e_reason];
|
||||||
}
|
}
|
||||||
IF_NO_GC([result retain];)
|
[result retain];
|
||||||
IF_NO_GC(DESTROY(pool);)
|
[pool release];
|
||||||
return AUTORELEASE(result);
|
return [result autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) raise
|
- (void) raise
|
||||||
|
|
|
@ -666,7 +666,7 @@ static NSStringEncoding defaultEncoding;
|
||||||
NSString *n = [a1 objectAtIndex: index];
|
NSString *n = [a1 objectAtIndex: index];
|
||||||
NSString *p1;
|
NSString *p1;
|
||||||
NSString *p2;
|
NSString *p2;
|
||||||
CREATE_AUTORELEASE_POOL(pool);
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
|
|
||||||
p1 = [path1 stringByAppendingPathComponent: n];
|
p1 = [path1 stringByAppendingPathComponent: n];
|
||||||
p2 = [path2 stringByAppendingPathComponent: n];
|
p2 = [path2 stringByAppendingPathComponent: n];
|
||||||
|
@ -1404,12 +1404,12 @@ static NSStringEncoding defaultEncoding;
|
||||||
NSString *item;
|
NSString *item;
|
||||||
NSString *next;
|
NSString *next;
|
||||||
BOOL result;
|
BOOL result;
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
|
|
||||||
item = [contents objectAtIndex: i];
|
item = [contents objectAtIndex: i];
|
||||||
next = [path stringByAppendingPathComponent: item];
|
next = [path stringByAppendingPathComponent: item];
|
||||||
result = [self removeFileAtPath: next handler: handler];
|
result = [self removeFileAtPath: next handler: handler];
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
if (result == NO)
|
if (result == NO)
|
||||||
{
|
{
|
||||||
return NO;
|
return NO;
|
||||||
|
@ -2700,7 +2700,7 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
||||||
{
|
{
|
||||||
NSDirectoryEnumerator *enumerator;
|
NSDirectoryEnumerator *enumerator;
|
||||||
NSString *dirEntry;
|
NSString *dirEntry;
|
||||||
CREATE_AUTORELEASE_POOL(pool);
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
|
|
||||||
enumerator = [self enumeratorAtPath: source];
|
enumerator = [self enumeratorAtPath: source];
|
||||||
while ((dirEntry = [enumerator nextObject]))
|
while ((dirEntry = [enumerator nextObject]))
|
||||||
|
@ -2789,7 +2789,7 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
||||||
}
|
}
|
||||||
[self changeFileAttributes: attributes atPath: destinationFile];
|
[self changeFileAttributes: attributes atPath: destinationFile];
|
||||||
}
|
}
|
||||||
RELEASE(pool);
|
[pool release];
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
@ -2801,7 +2801,7 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
||||||
#ifdef HAVE_LINK
|
#ifdef HAVE_LINK
|
||||||
NSDirectoryEnumerator *enumerator;
|
NSDirectoryEnumerator *enumerator;
|
||||||
NSString *dirEntry;
|
NSString *dirEntry;
|
||||||
CREATE_AUTORELEASE_POOL(pool);
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
|
|
||||||
enumerator = [self enumeratorAtPath: source];
|
enumerator = [self enumeratorAtPath: source];
|
||||||
while ((dirEntry = [enumerator nextObject]))
|
while ((dirEntry = [enumerator nextObject]))
|
||||||
|
@ -2879,7 +2879,7 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
||||||
}
|
}
|
||||||
[self changeFileAttributes: attributes atPath: destinationFile];
|
[self changeFileAttributes: attributes atPath: destinationFile];
|
||||||
}
|
}
|
||||||
RELEASE(pool);
|
[pool release];
|
||||||
return YES;
|
return YES;
|
||||||
#else
|
#else
|
||||||
return NO;
|
return NO;
|
||||||
|
|
|
@ -468,13 +468,13 @@ static NSDictionary *makeReference(unsigned ref)
|
||||||
|
|
||||||
+ (BOOL) archiveRootObject: (id)anObject toFile: (NSString*)aPath
|
+ (BOOL) archiveRootObject: (id)anObject toFile: (NSString*)aPath
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(pool);
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
NSData *d;
|
NSData *d;
|
||||||
BOOL result;
|
BOOL result;
|
||||||
|
|
||||||
d = [self archivedDataWithRootObject: anObject];
|
d = [self archivedDataWithRootObject: anObject];
|
||||||
result = [d writeToFile: aPath atomically: YES];
|
result = [d writeToFile: aPath atomically: YES];
|
||||||
RELEASE(pool);
|
[pool release];
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -485,8 +485,6 @@ static NSDictionary *makeReference(unsigned ref)
|
||||||
|
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
{
|
{
|
||||||
GSMakeWeakPointer(self, "delegate");
|
|
||||||
|
|
||||||
#if GS_WITH_GC
|
#if GS_WITH_GC
|
||||||
/* We create a typed memory descriptor for map nodes.
|
/* We create a typed memory descriptor for map nodes.
|
||||||
*/
|
*/
|
||||||
|
@ -495,6 +493,9 @@ static NSDictionary *makeReference(unsigned ref)
|
||||||
GC_set_bit(w, GC_WORD_OFFSET(GSIMapNode_t, value));
|
GC_set_bit(w, GC_WORD_OFFSET(GSIMapNode_t, value));
|
||||||
nodeDesc = GC_make_descriptor(w, GC_WORD_LEN(GSIMapNode_t));
|
nodeDesc = GC_make_descriptor(w, GC_WORD_LEN(GSIMapNode_t));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
GSMakeWeakPointer(self, "delegate");
|
||||||
|
|
||||||
if (globalClassMap == 0)
|
if (globalClassMap == 0)
|
||||||
{
|
{
|
||||||
globalClassMap =
|
globalClassMap =
|
||||||
|
|
|
@ -282,10 +282,10 @@ NSLog (NSString* format, ...)
|
||||||
void
|
void
|
||||||
NSLogv (NSString* format, va_list args)
|
NSLogv (NSString* format, va_list args)
|
||||||
{
|
{
|
||||||
NSString *prefix;
|
NSString *prefix;
|
||||||
NSString *message;
|
NSString *message;
|
||||||
static int pid = 0;
|
static int pid = 0;
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
|
|
||||||
if (_NSLog_printf_handler == NULL)
|
if (_NSLog_printf_handler == NULL)
|
||||||
{
|
{
|
||||||
|
@ -357,6 +357,6 @@ NSLogv (NSString* format, va_list args)
|
||||||
|
|
||||||
[myLock unlock];
|
[myLock unlock];
|
||||||
|
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1087,11 +1087,11 @@ static Class messagePortClass;
|
||||||
|
|
||||||
static void clean_up_sockets(void)
|
static void clean_up_sockets(void)
|
||||||
{
|
{
|
||||||
NSMessagePort *port;
|
NSMessagePort *port;
|
||||||
NSData *name;
|
NSData *name;
|
||||||
NSMapEnumerator mEnum;
|
NSMapEnumerator mEnum;
|
||||||
BOOL unknownThread = GSRegisterCurrentThread();
|
BOOL unknownThread = GSRegisterCurrentThread();
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
|
|
||||||
mEnum = NSEnumerateMapTable(messagePortMap);
|
mEnum = NSEnumerateMapTable(messagePortMap);
|
||||||
while (NSNextMapEnumeratorPair(&mEnum, (void *)&name, (void *)&port))
|
while (NSNextMapEnumeratorPair(&mEnum, (void *)&name, (void *)&port))
|
||||||
|
@ -1100,7 +1100,7 @@ static void clean_up_sockets(void)
|
||||||
unlink([name bytes]);
|
unlink([name bytes]);
|
||||||
}
|
}
|
||||||
NSEndMapTableEnumeration(&mEnum);
|
NSEndMapTableEnumeration(&mEnum);
|
||||||
IF_NO_GC(DESTROY(arp);)
|
[arp release];
|
||||||
if (unknownThread == YES)
|
if (unknownThread == YES)
|
||||||
{
|
{
|
||||||
GSUnregisterCurrentThread();
|
GSUnregisterCurrentThread();
|
||||||
|
|
|
@ -91,7 +91,7 @@ static void clean_up_names(void)
|
||||||
NSMessagePort *port;
|
NSMessagePort *port;
|
||||||
NSString *name;
|
NSString *name;
|
||||||
BOOL unknownThread = GSRegisterCurrentThread();
|
BOOL unknownThread = GSRegisterCurrentThread();
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
|
|
||||||
mEnum = NSEnumerateMapTable(portToNamesMap);
|
mEnum = NSEnumerateMapTable(portToNamesMap);
|
||||||
while (NSNextMapEnumeratorPair(&mEnum, (void *)&port, (void *)&name))
|
while (NSNextMapEnumeratorPair(&mEnum, (void *)&port, (void *)&name))
|
||||||
|
@ -99,7 +99,7 @@ static void clean_up_names(void)
|
||||||
[defaultServer removePort: port];
|
[defaultServer removePort: port];
|
||||||
}
|
}
|
||||||
NSEndMapTableEnumeration(&mEnum);
|
NSEndMapTableEnumeration(&mEnum);
|
||||||
IF_NO_GC(DESTROY(arp);)
|
[arp release];
|
||||||
if (unknownThread == YES)
|
if (unknownThread == YES)
|
||||||
{
|
{
|
||||||
GSUnregisterCurrentThread();
|
GSUnregisterCurrentThread();
|
||||||
|
|
|
@ -373,8 +373,8 @@ static NSArray *empty = nil;
|
||||||
|
|
||||||
- (void) start
|
- (void) start
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(pool);
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
double prio = [NSThread threadPriority];
|
double prio = [NSThread threadPriority];
|
||||||
|
|
||||||
[internal->lock lock];
|
[internal->lock lock];
|
||||||
NS_DURING
|
NS_DURING
|
||||||
|
@ -452,7 +452,7 @@ static NSArray *empty = nil;
|
||||||
}
|
}
|
||||||
NS_ENDHANDLER
|
NS_ENDHANDLER
|
||||||
[internal->lock unlock];
|
[internal->lock unlock];
|
||||||
RELEASE(pool);
|
[pool release];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (double) threadPriority
|
- (double) threadPriority
|
||||||
|
|
|
@ -154,13 +154,13 @@ static Class NSPort_concrete_class;
|
||||||
*/
|
*/
|
||||||
- (void) invalidate
|
- (void) invalidate
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
|
|
||||||
_is_valid = NO;
|
_is_valid = NO;
|
||||||
[[NSNotificationCenter defaultCenter]
|
[[NSNotificationCenter defaultCenter]
|
||||||
postNotificationName: NSPortDidBecomeInvalidNotification
|
postNotificationName: NSPortDidBecomeInvalidNotification
|
||||||
object: self];
|
object: self];
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) isValid
|
- (BOOL) isValid
|
||||||
|
|
|
@ -350,6 +350,14 @@ static IMP _xRefImp; /* Serialize a crossref. */
|
||||||
{
|
{
|
||||||
if (self == [NSPortCoder class])
|
if (self == [NSPortCoder class])
|
||||||
{
|
{
|
||||||
|
#if GS_WITH_GC
|
||||||
|
/* We create a typed memory descriptor for map nodes.
|
||||||
|
*/
|
||||||
|
GC_word w[GC_BITMAP_SIZE(GSIMapNode_t)] = {0};
|
||||||
|
GC_set_bit(w, GC_WORD_OFFSET(GSIMapNode_t, key));
|
||||||
|
GC_set_bit(w, GC_WORD_OFFSET(GSIMapNode_t, value));
|
||||||
|
nodeDesc = GC_make_descriptor(w, GC_WORD_LEN(GSIMapNode_t));
|
||||||
|
#endif
|
||||||
connectionClass = [NSConnection class];
|
connectionClass = [NSConnection class];
|
||||||
mutableArrayClass = [NSMutableArray class];
|
mutableArrayClass = [NSMutableArray class];
|
||||||
mutableDataClass = [NSMutableDataMalloc class];
|
mutableDataClass = [NSMutableDataMalloc class];
|
||||||
|
@ -365,14 +373,6 @@ static IMP _xRefImp; /* Serialize a crossref. */
|
||||||
_eTagImp = [mutableDataClass instanceMethodForSelector: eTagSel];
|
_eTagImp = [mutableDataClass instanceMethodForSelector: eTagSel];
|
||||||
_xRefImp = [mutableDataClass instanceMethodForSelector: xRefSel];
|
_xRefImp = [mutableDataClass instanceMethodForSelector: xRefSel];
|
||||||
mutableDictionaryClass = [NSMutableDictionary class];
|
mutableDictionaryClass = [NSMutableDictionary class];
|
||||||
#if GS_WITH_GC
|
|
||||||
/* We create a typed memory descriptor for map nodes.
|
|
||||||
*/
|
|
||||||
GC_word w[GC_BITMAP_SIZE(GSIMapNode_t)] = {0};
|
|
||||||
GC_set_bit(w, GC_WORD_OFFSET(GSIMapNode_t, key));
|
|
||||||
GC_set_bit(w, GC_WORD_OFFSET(GSIMapNode_t, value));
|
|
||||||
nodeDesc = GC_make_descriptor(w, GC_WORD_LEN(GSIMapNode_t));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -225,7 +225,7 @@ static NSMutableSet *mySet = nil;
|
||||||
static void
|
static void
|
||||||
_gnu_process_args(int argc, char *argv[], char *env[])
|
_gnu_process_args(int argc, char *argv[], char *env[])
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
NSString *arg0 = nil;
|
NSString *arg0 = nil;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
|
@ -175,7 +175,7 @@ foundIgnorableWhitespace: (NSString *)string
|
||||||
|
|
||||||
if (key == nil)
|
if (key == nil)
|
||||||
{
|
{
|
||||||
key = RETAIN([NSNull null]);
|
key = [[NSNull null] retain];
|
||||||
}
|
}
|
||||||
[stack addObject: key];
|
[stack addObject: key];
|
||||||
DESTROY(key);
|
DESTROY(key);
|
||||||
|
@ -191,7 +191,7 @@ foundIgnorableWhitespace: (NSString *)string
|
||||||
|
|
||||||
if (key == nil)
|
if (key == nil)
|
||||||
{
|
{
|
||||||
key = RETAIN([NSNull null]);
|
key = [[NSNull null] retain];
|
||||||
}
|
}
|
||||||
[stack addObject: key];
|
[stack addObject: key];
|
||||||
DESTROY(key);
|
DESTROY(key);
|
||||||
|
|
|
@ -423,7 +423,8 @@ static inline BOOL timerInvalidated(NSTimer *t)
|
||||||
|
|
||||||
- (void) _checkPerformers: (GSRunLoopCtxt*)context
|
- (void) _checkPerformers: (GSRunLoopCtxt*)context
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
|
|
||||||
if (context != nil)
|
if (context != nil)
|
||||||
{
|
{
|
||||||
GSIArray performers = context->performers;
|
GSIArray performers = context->performers;
|
||||||
|
@ -481,11 +482,11 @@ static inline BOOL timerInvalidated(NSTimer *t)
|
||||||
{
|
{
|
||||||
[array[i] fire];
|
[array[i] fire];
|
||||||
RELEASE(array[i]);
|
RELEASE(array[i]);
|
||||||
IF_NO_GC([arp emptyPool]);
|
IF_NO_GC([arp emptyPool];)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -715,7 +716,7 @@ static inline BOOL timerInvalidated(NSTimer *t)
|
||||||
*/
|
*/
|
||||||
if ([GSCurrentThread() isMainThread] == YES)
|
if ([GSCurrentThread() isMainThread] == YES)
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL (arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
GSRunLoopCtxt *context;
|
GSRunLoopCtxt *context;
|
||||||
NSNotificationCenter *ctr;
|
NSNotificationCenter *ctr;
|
||||||
NSNotification *not;
|
NSNotification *not;
|
||||||
|
@ -756,7 +757,7 @@ static inline BOOL timerInvalidated(NSTimer *t)
|
||||||
userInfo: nil
|
userInfo: nil
|
||||||
repeats: YES];
|
repeats: YES];
|
||||||
context->housekeeper = timer;
|
context->housekeeper = timer;
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return current;
|
return current;
|
||||||
|
@ -942,7 +943,7 @@ updateTimer(NSTimer *t, NSDate *d, NSTimeInterval now)
|
||||||
if (context != nil)
|
if (context != nil)
|
||||||
{
|
{
|
||||||
NSString *savedMode = _currentMode;
|
NSString *savedMode = _currentMode;
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
|
|
||||||
_currentMode = mode;
|
_currentMode = mode;
|
||||||
NS_DURING
|
NS_DURING
|
||||||
|
@ -982,7 +983,7 @@ updateTimer(NSTimer *t, NSDate *d, NSTimeInterval now)
|
||||||
{
|
{
|
||||||
[t fire];
|
[t fire];
|
||||||
GSPrivateNotifyASAP(_currentMode);
|
GSPrivateNotifyASAP(_currentMode);
|
||||||
IF_NO_GC([arp emptyPool]);
|
IF_NO_GC([arp emptyPool];)
|
||||||
updateTimer(t, d, now);
|
updateTimer(t, d, now);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1007,7 +1008,7 @@ updateTimer(NSTimer *t, NSDate *d, NSTimeInterval now)
|
||||||
GSIArrayRemoveItemAtIndexNoRelease(timers, i);
|
GSIArrayRemoveItemAtIndexNoRelease(timers, i);
|
||||||
[t fire];
|
[t fire];
|
||||||
GSPrivateNotifyASAP(_currentMode);
|
GSPrivateNotifyASAP(_currentMode);
|
||||||
IF_NO_GC([arp emptyPool]);
|
IF_NO_GC([arp emptyPool];)
|
||||||
if (updateTimer(t, d, now) == YES)
|
if (updateTimer(t, d, now) == YES)
|
||||||
{
|
{
|
||||||
/* Updated ... replace in array.
|
/* Updated ... replace in array.
|
||||||
|
@ -1069,7 +1070,7 @@ updateTimer(NSTimer *t, NSDate *d, NSTimeInterval now)
|
||||||
}
|
}
|
||||||
NS_ENDHANDLER
|
NS_ENDHANDLER
|
||||||
|
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
|
|
||||||
if (when == nil)
|
if (when == nil)
|
||||||
{
|
{
|
||||||
|
@ -1119,7 +1120,7 @@ updateTimer(NSTimer *t, NSDate *d, NSTimeInterval now)
|
||||||
NSTimeInterval ti = 0;
|
NSTimeInterval ti = 0;
|
||||||
int timeout_ms;
|
int timeout_ms;
|
||||||
NSString *savedMode = _currentMode;
|
NSString *savedMode = _currentMode;
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
|
|
||||||
NSAssert(mode, NSInvalidArgumentException);
|
NSAssert(mode, NSInvalidArgumentException);
|
||||||
if (mode == nil)
|
if (mode == nil)
|
||||||
|
@ -1163,7 +1164,7 @@ updateTimer(NSTimer *t, NSDate *d, NSTimeInterval now)
|
||||||
}
|
}
|
||||||
GSPrivateNotifyASAP(_currentMode);
|
GSPrivateNotifyASAP(_currentMode);
|
||||||
_currentMode = savedMode;
|
_currentMode = savedMode;
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
NS_VOIDRETURN;
|
NS_VOIDRETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1221,7 +1222,7 @@ updateTimer(NSTimer *t, NSDate *d, NSTimeInterval now)
|
||||||
[localException raise];
|
[localException raise];
|
||||||
}
|
}
|
||||||
NS_ENDHANDLER
|
NS_ENDHANDLER
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1238,8 +1239,8 @@ updateTimer(NSTimer *t, NSDate *d, NSTimeInterval now)
|
||||||
*/
|
*/
|
||||||
- (BOOL) runMode: (NSString*)mode beforeDate: (NSDate*)date
|
- (BOOL) runMode: (NSString*)mode beforeDate: (NSDate*)date
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
NSDate *d;
|
NSDate *d;
|
||||||
|
|
||||||
NSAssert(mode != nil, NSInvalidArgumentException);
|
NSAssert(mode != nil, NSInvalidArgumentException);
|
||||||
|
|
||||||
|
@ -1247,7 +1248,7 @@ updateTimer(NSTimer *t, NSDate *d, NSTimeInterval now)
|
||||||
d = [self limitDateForMode: mode];
|
d = [self limitDateForMode: mode];
|
||||||
if (d == nil)
|
if (d == nil)
|
||||||
{
|
{
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1260,13 +1261,13 @@ updateTimer(NSTimer *t, NSDate *d, NSTimeInterval now)
|
||||||
{
|
{
|
||||||
d = [d earlierDate: date];
|
d = [d earlierDate: date];
|
||||||
}
|
}
|
||||||
IF_NO_GC(RETAIN(d));
|
[d retain];
|
||||||
|
|
||||||
/* Wait, listening to our input sources. */
|
/* Wait, listening to our input sources. */
|
||||||
[self acceptInputForMode: mode beforeDate: d];
|
[self acceptInputForMode: mode beforeDate: d];
|
||||||
|
|
||||||
RELEASE(d);
|
[d release];
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2270,7 +2270,7 @@ handle_printf_atsign (FILE *stream,
|
||||||
int prefix_len = 0;
|
int prefix_len = 0;
|
||||||
unsigned length = [self length];
|
unsigned length = [self length];
|
||||||
unsigned aLength = [aString length];
|
unsigned aLength = [aString length];
|
||||||
unichar *u,*w;
|
unichar *u;
|
||||||
unichar a1[length+1];
|
unichar a1[length+1];
|
||||||
unichar *s1 = a1;
|
unichar *s1 = a1;
|
||||||
unichar a2[aLength+1];
|
unichar a2[aLength+1];
|
||||||
|
@ -2281,7 +2281,6 @@ handle_printf_atsign (FILE *stream,
|
||||||
[aString getCharacters: s2 range: ((NSRange){0, aLength})];
|
[aString getCharacters: s2 range: ((NSRange){0, aLength})];
|
||||||
s2[aLength] = (unichar)0;
|
s2[aLength] = (unichar)0;
|
||||||
u = s1;
|
u = s1;
|
||||||
w = s2;
|
|
||||||
|
|
||||||
if (mask & NSCaseInsensitiveSearch)
|
if (mask & NSCaseInsensitiveSearch)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1150,7 +1150,7 @@ quotedFromString(NSString *aString)
|
||||||
NSEnumerator *enumerator;
|
NSEnumerator *enumerator;
|
||||||
NSString *key;
|
NSString *key;
|
||||||
unichar terminator = 0;
|
unichar terminator = 0;
|
||||||
CREATE_AUTORELEASE_POOL(pool);
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
|
|
||||||
// Win32 environment variables must be sorted by name
|
// Win32 environment variables must be sorted by name
|
||||||
enumerator = [[[env allKeys]
|
enumerator = [[[env allKeys]
|
||||||
|
|
|
@ -829,7 +829,7 @@ static void *nsthreadLauncher(void* thread)
|
||||||
|
|
||||||
/* The thread must persist until it finishes executing.
|
/* The thread must persist until it finishes executing.
|
||||||
*/
|
*/
|
||||||
RETAIN(self);
|
[self retain];
|
||||||
|
|
||||||
/* Mark the thread as active whiul it's running.
|
/* Mark the thread as active whiul it's running.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -993,7 +993,7 @@ static NSMapTable *absolutes = 0;
|
||||||
}
|
}
|
||||||
if (abbreviationDictionary == nil)
|
if (abbreviationDictionary == nil)
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(pool);
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
NSString *path;
|
NSString *path;
|
||||||
|
|
||||||
path = _time_zone_path (ABBREV_DICT, @"plist");
|
path = _time_zone_path (ABBREV_DICT, @"plist");
|
||||||
|
@ -1038,7 +1038,7 @@ static NSMapTable *absolutes = 0;
|
||||||
[md makeImmutableCopyOnFail: NO];
|
[md makeImmutableCopyOnFail: NO];
|
||||||
abbreviationDictionary = md;
|
abbreviationDictionary = md;
|
||||||
}
|
}
|
||||||
RELEASE(pool);
|
[pool release];
|
||||||
}
|
}
|
||||||
if (zone_mutex != nil)
|
if (zone_mutex != nil)
|
||||||
{
|
{
|
||||||
|
@ -1067,7 +1067,7 @@ static NSMapTable *absolutes = 0;
|
||||||
}
|
}
|
||||||
if (abbreviationMap == nil)
|
if (abbreviationMap == nil)
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(pool);
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
NSMutableDictionary *md;
|
NSMutableDictionary *md;
|
||||||
NSMutableArray *ma;
|
NSMutableArray *ma;
|
||||||
NSString *the_name;
|
NSString *the_name;
|
||||||
|
@ -1184,7 +1184,7 @@ static NSMapTable *absolutes = 0;
|
||||||
|
|
||||||
[md makeImmutableCopyOnFail: NO];
|
[md makeImmutableCopyOnFail: NO];
|
||||||
abbreviationMap = RETAIN(md);
|
abbreviationMap = RETAIN(md);
|
||||||
RELEASE(pool);
|
[pool release];
|
||||||
}
|
}
|
||||||
if (zone_mutex != nil)
|
if (zone_mutex != nil)
|
||||||
{
|
{
|
||||||
|
@ -1717,9 +1717,10 @@ localZoneString, [zone name], sign, s/3600, (s/60)%60);
|
||||||
}
|
}
|
||||||
if (regionsArray == nil)
|
if (regionsArray == nil)
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(pool);
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
int index, i;
|
int index;
|
||||||
char name[80];
|
int i;
|
||||||
|
char name[80];
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
NSMutableArray *temp_array[24];
|
NSMutableArray *temp_array[24];
|
||||||
NSString *path;
|
NSString *path;
|
||||||
|
@ -1839,7 +1840,7 @@ localZoneString, [zone name], sign, s/3600, (s/60)%60);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
regionsArray = [[NSArray alloc] initWithObjects: temp_array count: 24];
|
regionsArray = [[NSArray alloc] initWithObjects: temp_array count: 24];
|
||||||
RELEASE(pool);
|
[pool release];
|
||||||
}
|
}
|
||||||
if (zone_mutex != nil)
|
if (zone_mutex != nil)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1559,9 +1559,9 @@ static BOOL isLocked = NO;
|
||||||
|
|
||||||
while ([_fileLock tryLock] == NO)
|
while ([_fileLock tryLock] == NO)
|
||||||
{
|
{
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
NSDate *when;
|
NSDate *when;
|
||||||
NSDate *lockDate;
|
NSDate *lockDate;
|
||||||
|
|
||||||
lockDate = [_fileLock lockDate];
|
lockDate = [_fileLock lockDate];
|
||||||
when = [NSDateClass dateWithTimeIntervalSinceNow: 0.1];
|
when = [NSDateClass dateWithTimeIntervalSinceNow: 0.1];
|
||||||
|
@ -1576,7 +1576,7 @@ static BOOL isLocked = NO;
|
||||||
{
|
{
|
||||||
NSLog(@"Failed to lock user defaults database even after "
|
NSLog(@"Failed to lock user defaults database even after "
|
||||||
@"breaking old locks!");
|
@"breaking old locks!");
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1593,7 +1593,7 @@ static BOOL isLocked = NO;
|
||||||
{
|
{
|
||||||
[NSThread sleepUntilDate: when];
|
[NSThread sleepUntilDate: when];
|
||||||
}
|
}
|
||||||
RELEASE(arp);
|
[arp release];
|
||||||
}
|
}
|
||||||
isLocked = YES;
|
isLocked = YES;
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ static void clean_up_names(void)
|
||||||
NSMessagePort *port;
|
NSMessagePort *port;
|
||||||
NSString *name;
|
NSString *name;
|
||||||
BOOL unknownThread = GSRegisterCurrentThread();
|
BOOL unknownThread = GSRegisterCurrentThread();
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
|
|
||||||
mEnum = NSEnumerateMapTable(portToNamesMap);
|
mEnum = NSEnumerateMapTable(portToNamesMap);
|
||||||
while (NSNextMapEnumeratorPair(&mEnum, (void *)&port, (void *)&name))
|
while (NSNextMapEnumeratorPair(&mEnum, (void *)&port, (void *)&name))
|
||||||
|
|
Loading…
Reference in a new issue