Wow thanks a lot. I think I would have never found it.
If I've found the right code you've got
type ConsumerS = object
...
close: proc (a1: Consumer) {.cdecl.}
Consumer = ptr ConsumerS
Run
which means `c.close()` refers to the member `close` of c, i.e. a proc which
expects a parameter
Might be that `impmltDyn` macro is causing the `a` parameter to
`mlt_consumer_close` to disappear. Try doing
import std/macros
expandMacros:
proc mlt_consumer_close*(a1: mlt_consumer) {.importc, cdecl, impmltDyn.}
Run
and see what it expands to.
I am having an issue with the calling convention. I have the following
function:
type
Consumer* = mlt_consumer
...
proc mlt_consumer_close*(a1: mlt_consumer) {.importc, cdecl, impmltDyn.}
...
proc close*(a:Consumer) =
mlt_consumer_close(a)