Help with dwt-cocoa types

Jacob Carlborg doobnet at gmail.com
Wed Jul 9 03:14:14 PDT 2008


Frank Benoit wrote:
> Jacob Carlborg schrieb:
>> typedef id (*IMP)(id, SEL, ...);
> 
> I think this typedef shows the declaration of 'IMP', not of 'id'.
> 
> struct objc_class{
>   // ...
> }
> struct objc_selector{
>   // ...
> }
> struct objc_object {
>   Class isa;
>   // ...
> }
> 
> alias objc_class * Class;
> alias objc_object * id;
> alias objc_selector * SEL;
> alias extern(C) id function(id, SEL, ...) IMP;

That makes sense. And here we can see how bad C styled function pointers 
are.


More information about the Digitalmars-d-dwt mailing list