Invocation fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15873 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2003-02-04 18:18:47 +00:00
parent 22206c66f3
commit b30484a6c0
5 changed files with 66 additions and 5 deletions

View file

@ -645,15 +645,23 @@ GSFFCallInvokeWithTargetAndImp(NSInvocation *_inv, id anObject, IMP imp)
id old_target;
IMP imp;
CLEAR_RETURN_VALUE_IF_OBJECT;
_validReturn = NO;
/*
* A message to a nil object returns nil.
*/
if (anObject == nil)
{
memset(_retval, '\0', _info[0].size); /* Clear return value */
if (*_info[0].type != _C_VOID)
{
_validReturn = YES;
}
return;
}
NSAssert(_selector != 0, @"you must set the selector before invoking");
/*
@ -697,6 +705,8 @@ GSFFCallInvokeWithTargetAndImp(NSInvocation *_inv, id anObject, IMP imp)
RELEASE(old_target);
GSFFCallInvokeWithTargetAndImp(self, anObject, imp);
RETAIN_RETURN_VALUE;
_validReturn = YES;
}