tidied a little

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3051 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1998-10-11 06:26:40 +00:00
parent 7cb68bb453
commit 522c47840a
7 changed files with 116 additions and 69 deletions

View file

@ -34,6 +34,8 @@
#include <Foundation/NSString.h>
#include <gnustep/base/o_map.h>
#include <Foundation/NSException.h>
#include <Foundation/NSPortCoder.h>
#include <Foundation/NSDistantObject.h>
#include <Foundation/NSZone.h>
#include <limits.h>
@ -513,16 +515,45 @@ static BOOL double_release_check_enabled = NO;
return self;
}
- (Class) classForArchiver
{
return [self classForCoder];
}
- (Class) classForCoder
{
return [self class];
}
- (Class) classForPortCoder
{
return [self classForCoder];
}
- (id) replacementObjectForArchiver: (NSCoder*)anArchiver
{
return [self replacementObjectForCoder: (NSCoder*)anArchiver];
}
- (id) replacementObjectForCoder: (NSCoder*)anEncoder
{
return self;
}
- (id) replacementObjectForPortCoder: (NSPortCoder*)aCoder
{
if ([aCoder isBycopy]) {
return self;
}
else if ([self isKindOfClass: [NSDistantObject class]]) {
return self;
}
else {
return [NSDistantObject proxyWithLocal: self
connection: [aCoder connection]];
}
}
/* NSObject protocol */
@ -746,6 +777,26 @@ static BOOL double_release_check_enabled = NO;
@end
@implementation NSObject (GNUstep)
/*
* GNUstep extensions to the OpenStep standard.
*/
+ (id) newWithCoder: (NSCoder*)coder inZone: (NSZone*)zone
{
id obj;
obj = [self allocWithZone: zone];
if (obj) {
obj = [obj initWithCoder: coder];
}
return obj;
}
@end
@implementation NSObject (NEXTSTEP)
@ -860,17 +911,6 @@ static BOOL double_release_check_enabled = NO;
withObject:anotherObject];
}
- perform: (SEL)sel withObject: anObject
{
return [self performSelector:sel withObject:anObject];
}
- perform: (SEL)sel withObject: anObject withObject: anotherObject
{
return [self performSelector:sel withObject:anObject
withObject:anotherObject];
}
@end