From db0baccb2e28cf10e982eda0388e984a72035f8d Mon Sep 17 00:00:00 2001 From: CaS Date: Mon, 7 Jul 2003 05:11:16 +0000 Subject: [PATCH] Tidyups git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17163 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/GSFFCallInvocation.m | 4 ++-- Source/GSFFIInvocation.m | 14 +++++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c66f97884..00c847aab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-07-07 Richard Frith-Macdonald + + * 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 * configure.ac: Add -R flags for netbsdelf diff --git a/Source/GSFFCallInvocation.m b/Source/GSFFCallInvocation.m index 42513faf6..b01b285ef 100644 --- a/Source/GSFFCallInvocation.m +++ b/Source/GSFFCallInvocation.m @@ -377,9 +377,9 @@ static IMP gs_objc_msg_forward (SEL sel) 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); if (!sel_type) diff --git a/Source/GSFFIInvocation.m b/Source/GSFFIInvocation.m index e8427fdd2..8a358bd9e 100644 --- a/Source/GSFFIInvocation.m +++ b/Source/GSFFIInvocation.m @@ -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 in the callback, but only under limited circumstances. */ - sel = gs_find_best_typed_sel (sel); sel_type = sel_get_type (sel); sig = nil; @@ -165,6 +164,19 @@ static IMP gs_objc_msg_forward (SEL sel) { 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));