Re: Hi all, pass Nim functions to C code as callbacks?

2020-06-18 Thread Stefan_Salewski
That is done in libs like gtk a lot. The Nim procs needs the cdecl pragma for this to work.

Hi all, pass Nim functions to C code as callbacks?

2020-06-18 Thread hyvuminhtuan
Hello forum im a new, nice to meet u all. I've looked around and I can't answer this. I want to be able to pass a Nim function / proc to C as a function pointer and get C to call it. I don't have a specific reason I want to do this, but I might need it soon. Many tks