extern(C) delegate

Mariusz `shd` Gliwiński" <alienballance at gmail.com> Mariusz `shd` Gliwiński" <alienballance at gmail.com>
Wed Dec 4 11:27:30 PST 2013


I'd like to expose my D API to C code.
For that, i'm going to write templates generate extern(C) 
definition alongside of D-one.
One thing i could do, is to generate D struct that mimics 
delegate with appropriate arguments. However, i'm curious of 
another possibility:

How do i call
extern(C) void test(int delegate(int) dlg = null)
from non-extern D code?


More information about the Digitalmars-d-learn mailing list