mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
iMinor fox for DO
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17266 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
66ef404e55
commit
29981f9f04
3 changed files with 41 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-07-20 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSProxy.m: Implement essential methods for a proxy to be
|
||||
vended over an NSConnection.
|
||||
|
||||
2003-07-20 17:27 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/NSConnection.m (-invalidate): Don't kill the targetToCached
|
||||
|
|
|
@ -979,14 +979,6 @@ enum
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy method ... returns the receiver.
|
||||
*/
|
||||
- (id) awakeAfterUsingCoder: (NSCoder*)aDecoder
|
||||
{
|
||||
return self;
|
||||
}
|
||||
|
||||
static inline BOOL class_is_kind_of (Class self, Class aClassObject)
|
||||
{
|
||||
Class class;
|
||||
|
|
|
@ -32,7 +32,10 @@
|
|||
#include "Foundation/NSAutoreleasePool.h"
|
||||
#include "Foundation/NSException.h"
|
||||
#include "Foundation/NSObjCRuntime.h"
|
||||
#include <limits.h>
|
||||
#include "Foundation/NSDistantObject.h"
|
||||
#include "Foundation/NSPortCoder.h"
|
||||
|
||||
@class NSDistantObject;
|
||||
|
||||
#ifndef NeXT_RUNTIME
|
||||
extern BOOL __objc_responds_to(id, SEL);
|
||||
|
@ -191,6 +194,14 @@ extern BOOL __objc_responds_to(id, SEL);
|
|||
return self;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy method ... returns the receiver.
|
||||
*/
|
||||
- (id) awakeAfterUsingCoder: (NSCoder*)aDecoder
|
||||
{
|
||||
return self;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the class of the receiver.
|
||||
*/
|
||||
|
@ -433,6 +444,30 @@ extern BOOL __objc_responds_to(id, SEL);
|
|||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the actual object to be encoded for sending over the
|
||||
* network on a Distributed Objects connection.
|
||||
*/
|
||||
- (id) replacementObjectForPortCoder: (NSPortCoder*)aCoder
|
||||
{
|
||||
static Class proxyClass = 0;
|
||||
static IMP proxyImp = 0;
|
||||
|
||||
if (proxyImp == 0)
|
||||
{
|
||||
proxyClass = [NSDistantObject class];
|
||||
/*
|
||||
* use get_imp() because NSDistantObject doesn't implement
|
||||
* methodForSelector:
|
||||
*/
|
||||
proxyImp = get_imp(GSObjCClass((id)proxyClass),
|
||||
@selector(proxyWithLocal:connection:));
|
||||
}
|
||||
|
||||
return (*proxyImp)(proxyClass, @selector(proxyWithLocal:connection:),
|
||||
self, [aCoder connection]);
|
||||
}
|
||||
|
||||
/**
|
||||
* If we respond to the method directly, return YES, otherwise
|
||||
* forward this request to the object we are acting as a proxy for.
|
||||
|
|
Loading…
Reference in a new issue