mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
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:
parent
0cfa9cfa9c
commit
f7972ed62d
17 changed files with 745 additions and 379 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue