mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Minor codding improvements
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6795 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bfa544a2d5
commit
060cbdf88d
4 changed files with 32 additions and 17 deletions
|
@ -888,15 +888,28 @@ static BOOL deallocNotifications = NO;
|
|||
|
||||
- (id) replacementObjectForPortCoder: (NSPortCoder*)aCoder
|
||||
{
|
||||
if ([aCoder isBycopy]) {
|
||||
return self;
|
||||
static Class proxyClass = 0;
|
||||
static IMP proxyImp = 0;
|
||||
|
||||
if (proxyImp == 0)
|
||||
{
|
||||
proxyClass = [NSDistantObject class];
|
||||
proxyImp = [proxyClass methodForSelector:
|
||||
@selector(proxyWithLocal:connection:)];
|
||||
}
|
||||
else if ([self isKindOfClass: [NSDistantObject class]]) {
|
||||
return self;
|
||||
|
||||
if ([aCoder isBycopy])
|
||||
{
|
||||
return self;
|
||||
}
|
||||
else {
|
||||
return [NSDistantObject proxyWithLocal: self
|
||||
connection: [aCoder connection]];
|
||||
else if ([self isKindOfClass: proxyClass])
|
||||
{
|
||||
return self;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (*proxyImp)(proxyClass, @selector(proxyWithLocal:connection:),
|
||||
self, [aCoder connection]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue