delegates with C linkage

Zarathustra adam.chrapkowski at gmail.com
Sat Jun 5 06:42:09 PDT 2010


> only with static methods - a real delegate needs the this-pointer in a
> register (not on the stack), thats the main difference between function
> ptr and delegates, thats why you can't use a (non static) method on for
> example the win-api callbacks, because the caller don't know your object

gcc:
__attribute__((regparm (1))) put_first_paramerter_to_eax(d_object this){...}

__attribute__((regparm (1))) - puts the first function parameter to EAX.


More information about the Digitalmars-d-learn mailing list