proc callback(arg: cint; arg2: cstring) {.cdecl.} = setupForeignThreadGc() # ... more code here toC(callback) Run
- How do I pass Nim functions to C code as callbacks? Keithcat1
- Re: How do I pass Nim functions to C code as callbacks? Araq
proc callback(arg: cint; arg2: cstring) {.cdecl.} = setupForeignThreadGc() # ... more code here toC(callback) Run