On Friday, 29 July 2016 at 12:15:22 UTC, Mike Parker wrote:


Yes, this is correct as long as the calling convention is not stdcall or something else:

Though, I should add the caveat that you need to ensure the definition of the C function does not specify any parameters. AFAIK, this is legal:

// foo.h
void func();

// foo.c
void func(int a, int b) { ... }

In which case you would want to include the parameters in your binding.


Reply via email to