* EOControl/EOFault.m ([-forward::]): Make dummy implementation.

([+initialize]): Adjust runtime to use NSObjects implementation
	of -forward:: to invoke fowardInvocation.  Useful for OS X,
	reported my Tim McIntosh.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26225 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ayers 2008-03-06 13:33:48 +00:00
parent 2a7cb4747b
commit 0d0f81cd7f
2 changed files with 20 additions and 11 deletions

View file

@ -1,5 +1,10 @@
2008-03-06 David Ayers <ayers@fsfe.org>
* EOControl/EOFault.m ([-forward::]): Make dummy implementation.
([+initialize]): Adjust runtime to use NSObjects implementation
of -forward:: to invoke fowardInvocation. Useful for OS X,
reported my Tim McIntosh.
* EOAccess/EORelationship.m ([-setEntity:]): Modify remove
relatioship from previous entity and add recursion detection.
Add documention.

View file

@ -82,6 +82,15 @@ static Class EOFaultClass = NULL;
// without asking if it responds to it !
if (EOFaultClass == NULL)
{
GSMethod nsfwd = GSGetMethod([NSObject class],
@selector(forward::),
YES,NO);
GSMethod eofwd = GSGetMethod(self,
@selector(forward::),
YES,NO);
eofwd->method_imp = nsfwd->method_imp;
GSFlushMethodCacheForClass(self);
EOFaultClass = [EOFault class];
}
}
@ -477,19 +486,14 @@ static Class EOFaultClass = NULL;
NSStringFromSelector(selector)];
}
- (retval_t)forward: (SEL)selector
/**
* This method is replaced by the current implementation of NSObject.
*/
- (retval_t)forward: (SEL)selector
: (arglist_t)args
{
retval_t ret;
NSInvocation *inv;
inv = [[[NSInvocation alloc] initWithArgframe: args
selector: selector]
autorelease];
[self forwardInvocation: inv];
ret = [inv returnFrame: args];
retval_t ret = 0;
NSAssert(NO,@"This should never be called (see +initialize).");
return ret;
}