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

@ -278,13 +278,17 @@ GSFFIInvokeWithTargetAndImp(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)
{
if (_retval)
memset(_retval, '\0', _info[0].size); /* Clear return value */
memset(_retval, '\0', _info[0].size); /* Clear return value */
_validReturn = YES;
return;
}
@ -335,6 +339,8 @@ GSFFIInvokeWithTargetAndImp(NSInvocation *_inv, id anObject, IMP imp)
/* Decode the return value */
if (*_info[0].type != _C_VOID)
cifframe_decode_arg(_info[0].type, _retval);
RETAIN_RETURN_VALUE;
_validReturn = YES;
}