Combining Delegate and Functions

Daniel Keep daniel.keep.lists at gmail.com
Sat Jul 4 09:31:38 PDT 2009



Eric Poggel wrote:
> Daniel Keep wrote:
>>
>> Eric Poggel wrote:
>>> ...
>>>
>>> Also, do you see any problems that would arise from replacing functions
>>> with delegates internally, so that no more conversions between them
>>> would be required?
>>
>> Say goodbye to being able to call non-D libraries that take callbacks?
> 
> cfunc(&foo.funcptr)
> 
> ?

Umm, no.  Delegates have a different calling convention to function
pointers.  It will expect the context pointer in EAX.



More information about the Digitalmars-d mailing list