Thanks for the explanation @yglukhov !
Did the **pragma** pragma maybe work differently two years ago when the wrapper
was made? Why else would _{.pragma: stdcall.}_ be used there?
**{.push stdcall.}** seems to be invalid, so I used:
when defined(windows):
...
{pragma: convention, stdcall}
else:
...
{pragma: convention, cdecl}
...
proc wmove*(a2: ptr WINDOW; a3, a4: cint): cint {.convention, importc:
"wmove".}
As you can see I don't even have much experience with pragmas , let alone
calling conventions.
I've been looking at the original line _{.pragma: stdcall.}_ in the wrapper for
two days now, and always thought to myself: "I guess this pragma sets the
calling convention for the entire module, the person who wrote it had to know
what he was doing, right?".
As far as why all conventions seem to work, I have no idea? _stdcall_, _cdecl_
and _noconv_ seem to work, while _fastcall_ and _nimcall_ don't.
Thanks again @yglukhov!