mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +00:00
Generate useful error message when no best typed selector can be found
in forwarding callback. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35784 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c67e228f86
commit
a1843ff254
2 changed files with 16 additions and 5 deletions
|
@ -1,4 +1,9 @@
|
|||
2012-11-02 Wolfgang Lux <wlux@uni-muenster.de>
|
||||
2012-11-05 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/GSFFIInvocation.m (GSFFIInvocationCallback): Generate
|
||||
useful error message when no best typed selector can be found.
|
||||
|
||||
2012-11-02 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* configure.ac: Use AC_FUNC_STRERROR_R to check for presence and
|
||||
version of the strerror_r function.
|
||||
|
|
|
@ -594,12 +594,18 @@ GSFFIInvocationCallback(ffi_cif *cif, void *retp, void **args, void *user)
|
|||
|
||||
if (sig == nil)
|
||||
{
|
||||
selector = gs_find_best_typed_sel (selector);
|
||||
/* NB Don't overwrite selector prematurely, so we can show the untyped
|
||||
* selector in the error message below if there is no best selector. */
|
||||
SEL typed_sel = gs_find_best_typed_sel (selector);
|
||||
|
||||
if (GSTypesFromSelector(selector) != 0)
|
||||
if (typed_sel != 0)
|
||||
{
|
||||
sig = [NSMethodSignature signatureWithObjCTypes:
|
||||
GSTypesFromSelector(selector)];
|
||||
selector = typed_sel;
|
||||
if (GSTypesFromSelector(selector) != 0)
|
||||
{
|
||||
sig = [NSMethodSignature signatureWithObjCTypes:
|
||||
GSTypesFromSelector(selector)];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue