D 2.0 - dalegates to function
Frits van Bommel
fvbommel at REMwOVExCAPSs.nl
Fri Mar 2 01:19:12 PST 2007
Lionello Lunesu wrote:
> But how can a delegate ever get "thunked" to behave like a function? R
> delegate(X...) => R function(C,X...), with the C the context ?
Basically, a bit of code is generated at run-time (on the heap) that
calls the delegate with the correct context pointer. Then that code is
pointed to by the function pointer.
The context pointer can be put into the code as an immediate value.
More information about the Digitalmars-d
mailing list