Massive tidy up

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6862 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2000-07-03 11:47:17 +00:00
parent 0cfa9cfa9c
commit f7972ed62d
17 changed files with 745 additions and 379 deletions

View file

@ -35,17 +35,22 @@
@implementation NSPort
Class _abstractClass;
Class _concreteClass;
+ (id) allocWithZone: (NSZone*)aZone
{
return [super allocWithZone: aZone];
if (self == _abstractClass)
return NSAllocateObject(_concreteClass, 0, aZone);
else
return [super allocWithZone: aZone];
}
+ (void) initialize
{
if (self == [NSPort class])
{
_abstractClass = self;
_concreteClass = [GSTcpPort class];
}
}
@ -148,7 +153,7 @@ Class _concreteClass;
- (void) setDelegate: (id) anObject
{
NSAssert([anObject respondsToSelector: @selector(handlePortMessage:)],
NSInvalidArgumentException);
NSInvalidArgumentException);
_delegate = anObject;
}