what @demotomohiro said.
a cstring is a pointer to char, Nim is stricter about that than C, so you need to `free(cast[pointer](val))` alternatively your free overload should be: proc free(cstr: cstring) {.importc: "free", header: "<stdlib.h>".} Run
what @demotomohiro said.
a cstring is a pointer to char, Nim is stricter about that than C, so you need to `free(cast[pointer](val))` alternatively your free overload should be: proc free(cstr: cstring) {.importc: "free", header: "<stdlib.h>".} Run