gnustep-dev
[Top][All Lists]
Advanced

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

Re: Typed selector on apple runtime question (StepTalk porting)


From: Nicola Pero
Subject: Re: Typed selector on apple runtime question (StepTalk porting)
Date: Tue, 9 Nov 2004 16:41:05 +0000 (GMT)

> 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?

Typed selectors are a {GNU runtime}-only feature.  It's a GNU extension.

I suppose you should not rely on having typed selectors if you want to run
StepTalk on Apple.  Else, you will have to assume that all arguments an d
return types are 'id'.





reply via email to

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