Attempt workaround for runtime providing insufficient information in callback.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33814 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2011-09-07 09:42:50 +00:00
parent b7b4333de4
commit 6cd7e3a588
2 changed files with 17 additions and 1 deletions

View file

@ -433,7 +433,14 @@ GSFFIInvokeWithTargetAndImp(NSInvocation *inv, id anObject, IMP imp)
return;
}
/* Make sure we have a typed selector for forwarding.
*/
NSAssert(_selector != 0, @"you must set the selector before invoking");
if (0 == GSTypesFromSelector(_selector))
{
_selector = GSSelectorFromNameAndTypes(sel_getName(_selector),
[_sig methodType]);
}
/*
* Temporarily set new target and copy it (and the selector) into the
@ -560,7 +567,8 @@ GSFFIInvocationCallback(ffi_cif *cif, void *retp, void **args, void *user)
sig = nil;
if (gs_protocol_selector(GSTypesFromSelector(selector)) == YES)
{
sig = [NSMethodSignature signatureWithObjCTypes: GSTypesFromSelector(selector)];
sig = [NSMethodSignature signatureWithObjCTypes:
GSTypesFromSelector(selector)];
}
if (sig == nil)
{