mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17163 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ffcaf01b15
commit
db0baccb2e
3 changed files with 21 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue