git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17163 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2003-07-07 05:11:16 +00:00
parent ffcaf01b15
commit db0baccb2e
3 changed files with 21 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2003-07-07 Richard Frith-Macdonald <rfm@gnu.org>
* Source/Source/GSFFCallInvocation.m: gs_objc_msg_forward() trust the
selector we are given. Rather than trying to find a better one.
* Source/GSFFIInvocation.m: ditto
2003-07-06 Adam Fedor <fedor@gnu.org> 2003-07-06 Adam Fedor <fedor@gnu.org>
* configure.ac: Add -R flags for netbsdelf * configure.ac: Add -R flags for netbsdelf

View file

@ -377,9 +377,9 @@ static IMP gs_objc_msg_forward (SEL sel)
void *forwarding_callback; void *forwarding_callback;
/* /*
* 1. determine return type. * 1. determine return type. The compiler should have provided us with
* a typed selector if possible, if not we have to assume an id return.
*/ */
sel = gs_find_best_typed_sel (sel);
sel_type = sel_get_type (sel); sel_type = sel_get_type (sel);
if (!sel_type) if (!sel_type)

View file

@ -157,7 +157,6 @@ static IMP gs_objc_msg_forward (SEL sel)
get the right one, though. What to do then? Perhaps it can be fixed up get the right one, though. What to do then? Perhaps it can be fixed up
in the callback, but only under limited circumstances. in the callback, but only under limited circumstances.
*/ */
sel = gs_find_best_typed_sel (sel);
sel_type = sel_get_type (sel); sel_type = sel_get_type (sel);
sig = nil; sig = nil;
@ -165,6 +164,19 @@ static IMP gs_objc_msg_forward (SEL sel)
{ {
sig = [NSMethodSignature signatureWithObjCTypes: sel_type]; sig = [NSMethodSignature signatureWithObjCTypes: sel_type];
} }
else
{
static NSMethodSignature *def = nil;
/*
* Default signature is for a method returning an object.
*/
if (def == nil)
{
def = RETAIN([NSMethodSignature signatureWithObjCTypes: "@@:"]);
}
sig = def;
}
NSCAssert1(sig, @"No signature for selector %@", NSStringFromSelector(sel)); NSCAssert1(sig, @"No signature for selector %@", NSStringFromSelector(sel));