Binding to C macros functions

2021-02-18 Thread Clonk
> use nodecl not cdecl so that no definition is produced. I'll test it out. > There is nothing particularly different when it comes to binding C functions > vs macros in nim - in the end it is just a codegen. Perhaps I need to explain a bit more :). I'm making a Nim wrapper to the Julia progra

Binding to C macros functions

2021-02-18 Thread mratsim
use `nodecl` not `cdecl` so that no definition is produced.

Binding to C macros functions

2021-02-18 Thread haxscramper_
There is nothing particularly different when it comes to binding C functions vs macros in nim - in the end it is just a codegen. Though as you mentioned in your comment this can be extremely unreliable due to codegen **and** C macros in the same place - stray comma can completely mess up everyt

Binding to C macros functions

2021-02-18 Thread Clonk
Hello, I've got a tricky question : Is Nim able to reliably bind function defined as macro in C code or am I wasting my time ? I'm talking stuff like : extern void coolFuncDontLookAtExplosion(void *); #define coolFuncDontLookAtExplosion(arg1) \ // define your super macr