revrt archiving changes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29877 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2010-03-08 12:07:11 +00:00
parent 424814815e
commit 0b6a80065e
6 changed files with 28 additions and 28 deletions

View file

@ -191,7 +191,7 @@ static Class GSInlineArrayClass;
{ {
/* For performace we encode directly ... must exactly match the /* For performace we encode directly ... must exactly match the
* superclass implemenation. */ * superclass implemenation. */
[aCoder encodeValueOfObjCType: @encode(NSUInteger) [aCoder encodeValueOfObjCType: @encode(unsigned)
at: &_count]; at: &_count];
if (_count > 0) if (_count > 0)
{ {
@ -212,7 +212,7 @@ static Class GSInlineArrayClass;
{ {
/* for performance, we decode directly into memory rather than /* for performance, we decode directly into memory rather than
* using the superclass method. Must exactly match superclass. */ * using the superclass method. Must exactly match superclass. */
[aCoder decodeValueOfObjCType: @encode(NSUInteger) [aCoder decodeValueOfObjCType: @encode(unsigned)
at: &_count]; at: &_count];
if (_count > 0) if (_count > 0)
{ {
@ -542,9 +542,9 @@ static Class GSInlineArrayClass;
} }
else else
{ {
NSUInteger count; unsigned count;
[aCoder decodeValueOfObjCType: @encode(NSUInteger) [aCoder decodeValueOfObjCType: @encode(unsigned)
at: &count]; at: &count];
if ((self = [self initWithCapacity: count]) == nil) if ((self = [self initWithCapacity: count]) == nil)
{ {
@ -1135,17 +1135,17 @@ static Class GSInlineArrayClass;
} }
else else
{ {
NSUInteger c; unsigned c;
#if GS_WITH_GC #if GS_WITH_GC
GSArray *a; GSArray *a;
[aCoder decodeValueOfObjCType: @encode(NSUInteger) at: &c]; [aCoder decodeValueOfObjCType: @encode(unsigned) at: &c];
a = (id)NSAllocateObject(GSArrayClass, 0, [self zone]); a = (id)NSAllocateObject(GSArrayClass, 0, [self zone]);
a->_contents_array = NSAllocateCollectable(sizeof(id)*c, NSScannedOption); a->_contents_array = NSAllocateCollectable(sizeof(id)*c, NSScannedOption);
#else #else
GSInlineArray *a; GSInlineArray *a;
[aCoder decodeValueOfObjCType: @encode(NSUInteger) at: &c]; [aCoder decodeValueOfObjCType: @encode(unsigned) at: &c];
a = (id)NSAllocateObject(GSInlineArrayClass, a = (id)NSAllocateObject(GSInlineArrayClass,
sizeof(id)*c, [self zone]); sizeof(id)*c, [self zone]);
a->_contents_array a->_contents_array

View file

@ -167,12 +167,12 @@ static GC_descr nodeDesc; // Type descriptor for map node.
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
NSUInteger count = map.nodeCount; unsigned count = map.nodeCount;
SEL sel1 = @selector(encodeObject:); SEL sel1 = @selector(encodeObject:);
IMP imp1 = [aCoder methodForSelector: sel1]; IMP imp1 = [aCoder methodForSelector: sel1];
SEL sel2 = @selector(encodeValueOfObjCType:at:); SEL sel2 = @selector(encodeValueOfObjCType:at:);
IMP imp2 = [aCoder methodForSelector: sel2]; IMP imp2 = [aCoder methodForSelector: sel2];
const char *type = @encode(NSUInteger); const char *type = @encode(unsigned);
GSIMapEnumerator_t enumerator = GSIMapEnumeratorForMap(&map); GSIMapEnumerator_t enumerator = GSIMapEnumeratorForMap(&map);
GSIMapNode node = GSIMapEnumeratorNextNode(&enumerator); GSIMapNode node = GSIMapEnumeratorNextNode(&enumerator);
@ -206,12 +206,12 @@ static GC_descr nodeDesc; // Type descriptor for map node.
- (id) initWithCoder: (NSCoder*)aCoder - (id) initWithCoder: (NSCoder*)aCoder
{ {
NSUInteger count; unsigned count;
id value; id value;
NSUInteger valcnt; NSUInteger valcnt;
SEL sel = @selector(decodeValueOfObjCType:at:); SEL sel = @selector(decodeValueOfObjCType:at:);
IMP imp = [aCoder methodForSelector: sel]; IMP imp = [aCoder methodForSelector: sel];
const char *utype = @encode(NSUInteger); const char *utype = @encode(unsigned);
const char *otype = @encode(id); const char *otype = @encode(id);
(*imp)(aCoder, sel, utype, &count); (*imp)(aCoder, sel, utype, &count);

View file

@ -126,13 +126,13 @@ static SEL objSel;
} }
else else
{ {
NSUInteger count = map.nodeCount; unsigned count = map.nodeCount;
SEL sel = @selector(encodeObject:); SEL sel = @selector(encodeObject:);
IMP imp = [aCoder methodForSelector: sel]; IMP imp = [aCoder methodForSelector: sel];
GSIMapEnumerator_t enumerator = GSIMapEnumeratorForMap(&map); GSIMapEnumerator_t enumerator = GSIMapEnumeratorForMap(&map);
GSIMapNode node = GSIMapEnumeratorNextNode(&enumerator); GSIMapNode node = GSIMapEnumeratorNextNode(&enumerator);
[aCoder encodeValueOfObjCType: @encode(NSUInteger) at: &count]; [aCoder encodeValueOfObjCType: @encode(unsigned) at: &count];
while (node != 0) while (node != 0)
{ {
(*imp)(aCoder, sel, node->key.obj); (*imp)(aCoder, sel, node->key.obj);
@ -161,14 +161,14 @@ static SEL objSel;
} }
else else
{ {
NSUInteger count; unsigned count;
id key; id key;
id value; id value;
SEL sel = @selector(decodeValueOfObjCType:at:); SEL sel = @selector(decodeValueOfObjCType:at:);
IMP imp = [aCoder methodForSelector: sel]; IMP imp = [aCoder methodForSelector: sel];
const char *type = @encode(id); const char *type = @encode(id);
[aCoder decodeValueOfObjCType: @encode(NSUInteger) [aCoder decodeValueOfObjCType: @encode(unsigned)
at: &count]; at: &count];
GSIMapInitWithZoneAndCapacity(&map, [self zone], count); GSIMapInitWithZoneAndCapacity(&map, [self zone], count);

View file

@ -199,13 +199,13 @@ static Class mutableSetClass;
} }
else else
{ {
NSUInteger count = map.nodeCount; unsigned count = map.nodeCount;
SEL sel = @selector(encodeObject:); SEL sel = @selector(encodeObject:);
IMP imp = [aCoder methodForSelector: sel]; IMP imp = [aCoder methodForSelector: sel];
GSIMapEnumerator_t enumerator = GSIMapEnumeratorForMap(&map); GSIMapEnumerator_t enumerator = GSIMapEnumeratorForMap(&map);
GSIMapNode node = GSIMapEnumeratorNextNode(&enumerator); GSIMapNode node = GSIMapEnumeratorNextNode(&enumerator);
[aCoder encodeValueOfObjCType: @encode(NSUInteger) at: &count]; [aCoder encodeValueOfObjCType: @encode(unsigned) at: &count];
while (node != 0) while (node != 0)
{ {
(*imp)(aCoder, sel, node->key.obj); (*imp)(aCoder, sel, node->key.obj);
@ -233,13 +233,13 @@ static Class mutableSetClass;
} }
else else
{ {
NSUInteger count; unsigned count;
id value; id value;
SEL sel = @selector(decodeValueOfObjCType:at:); SEL sel = @selector(decodeValueOfObjCType:at:);
IMP imp = [aCoder methodForSelector: sel]; IMP imp = [aCoder methodForSelector: sel];
const char *type = @encode(id); const char *type = @encode(id);
(*imp)(aCoder, sel, @encode(NSUInteger), &count); (*imp)(aCoder, sel, @encode(unsigned), &count);
GSIMapInitWithZoneAndCapacity(&map, [self zone], count); GSIMapInitWithZoneAndCapacity(&map, [self zone], count);
while (count-- > 0) while (count-- > 0)

View file

@ -57,10 +57,10 @@ ADDITIONAL_CPPFLAGS = $(DEFS) $(CONFIG_SYSTEM_DEFS) -Wall \
# Additional flags to pass to the Objective-C compiler # Additional flags to pass to the Objective-C compiler
ADDITIONAL_OBJCFLAGS = #£ADDITIONAL_OBJCFLAGS+=
# Additional flags to pass to the C compiler # Additional flags to pass to the C compiler
ADDITIONAL_CFLAGS = #ADDITIONAL_CFLAGS+=
# Additional include directories the compiler should search # Additional include directories the compiler should search
ADDITIONAL_INCLUDE_DIRS = \ ADDITIONAL_INCLUDE_DIRS = \
@ -69,7 +69,7 @@ ADDITIONAL_INCLUDE_DIRS = \
-I./$(GNUSTEP_TARGET_DIR) -I./$(GNUSTEP_TARGET_DIR)
# Additional LDFLAGS to pass to the linker # Additional LDFLAGS to pass to the linker
ADDITIONAL_LDFLAGS = #ADDITIONAL_LDFLAGS+=
# Additional library directories the linker should search # Additional library directories the linker should search
ADDITIONAL_LIB_DIRS = -L$(GNUSTEP_OBJ_DIR) ADDITIONAL_LIB_DIRS = -L$(GNUSTEP_OBJ_DIR)

View file

@ -897,20 +897,19 @@ callUncaughtHandler(id value)
- (void) raise - (void) raise
{ {
#ifndef _NATIVE_OBJC_EXCEPTIONS
NSThread *thread;
NSHandler *handler;
#endif
if (_reserved == 0) if (_reserved == 0)
{ {
_reserved = NSZoneCalloc([self zone], 2, sizeof(id)); _reserved = NSZoneCalloc([self zone], 2, sizeof(id));
} }
_e_stack = [GSStackTrace new]; _e_stack = [GSStackTrace new];
#ifdef _NATIVE_OBJC_EXCEPTIONS #if defined(_NATIVE_OBJC_EXCEPTIONS)
@throw self; @throw self;
#else #else
{
NSThread *thread;
NSHandler *handler;
thread = GSCurrentThread(); thread = GSCurrentThread();
handler = thread->_exception_handler; handler = thread->_exception_handler;
if (handler == NULL) if (handler == NULL)
@ -940,6 +939,7 @@ callUncaughtHandler(id value)
thread->_exception_handler = handler->next; thread->_exception_handler = handler->next;
handler->exception = self; handler->exception = self;
longjmp(handler->jumpState, 1); longjmp(handler->jumpState, 1);
}
#endif #endif
} }