Extern Keyword for Function Type

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


exten(C) {
     testFunction(int function(int));
}

testFunction now requires an external function as parameter. It 
can't be called with a pointer to a D function.

Logical Solution:

extern(C) {
     testFunction(extern(D) int function(int)); // DOES NOT COMPILE
}

How do you fix this without moving it outside the global extern 
block?


More information about the Digitalmars-d-learn mailing list