alias and extern(C) for callbacks
Carl Sturtivant
sturtivant at gmail.com
Thu Aug 22 16:55:43 PDT 2013
The D language page on interfacing to C
http://dlang.org/interfaceToC.html
says under 'Callbacks' that e.g.
alias extern(C) int function(int, int) Callback; // D code
is OK, so I am wondering if I can factor out the extern(C) from
aliases as follows
extern(C) {
alias int function(int, int) Callback;
// more aliases
}
Is Callback here a name for the same type as if it was defined by
the following?
alias extern(C) int function(int, int) Callback;
More information about the Digitalmars-d-learn
mailing list