It's supposed to work, yes and should be documented in the manual.
Just to make sure you're answering the exact question I asked :) — if I declare
a C proc that takes an `openarray`, when Nim calls that function does it pass
that parameter as a pointer followed by an int? For example:
proc set_bytes(bytes: openarray[byte]) {.importc: "set_bytes".}
I would use `openarray[uint8]` too. Strictly speaking though Nim uses a Nim
`int` (== `ssize_t`) as the length information and so it's incompatible for
arrays which contain more than 2 billion elements (on a 32 bit machine). Never
happens.
I'm working on Nim glue to a C API that uses `struct iovec` a lot as a
parameter type — a generic (pointer, length) tuple indicating a range of memory
to read or write.
IIRC, a Nim `openarray[uint8]` is passed the same way as an `iovec`: as the
address of the first byte, then the length. So if