Extern Keyword for Function Type

Jeroen Bollen jbinero at gmail.com
Tue Apr 15 13:27:33 PDT 2014


On Tuesday, 15 April 2014 at 20:19:36 UTC, Dicebot wrote:
> C has no knowledge of D ABI so this can't work. If you just 
> want to store D function pointer to later retrieve it and call 
> from D code, you can as well store it as void* (or extern(C) 
> with similar signature to preserve part of type) and cast upon 
> interfacing.

Hmm so the function passed should be declared as extern C but be 
defined nonetheless? That makes sense.


More information about the Digitalmars-d-learn mailing list