gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Typed selector on apple runtime question (StepTalk porting)


From: stefan
Subject: Typed selector on apple runtime question (StepTalk porting)
Date: Tue, 9 Nov 2004 11:36:39 +0100
User-agent: Internet Messaging Program (IMP) 3.2.2

Hi,

In StepTalk framework there is the method that will return a method signature
according to a selector. NSMEthodSignature requires types to be created. If
there are no types for given selector, then they are created with id for return
value and id for each argument (parsed ':' from selector name).

>From dev-libs/StepTalk/Frameworks/StepTalk/STObjCRuntime.m:

NSMethodSignature *STMethodSignatureForSelector(SEL sel)
{
    const char *types;
    
    types = sel_get_type(sel);
    
    if(!types)
    {
        sel = STCreateTypedSelector(sel);
        types = sel_get_type(sel);
    }
    return [NSMethodSignature signatureWithObjCTypes:types];
}

(to see whole source online:
http://savannah.gnu.org/cgi-bin/viewcvs/gnustep/gnustep/dev-libs/StepTalk/Frameworks/StepTalk/STObjCRuntime.m?rev=1.5&content-type=text/vnd.viewcvs-markup)

However, there is no sel_get_type(sel) equivalent on OSX. Any hints how can be
this miplemented on Apple runtime?

Or if you think that the whole problem can be solved differently, then let me
know how to do it.

Thanks,

Stefan Urbanek




reply via email to

[Prev in Thread] Current Thread [Next in Thread]