if I have a C library that returns a pointer to an array like this:
proc glMapBuffer(target: GLenum, access: GLenum): pointer
If it possible to turn that into a seq without copying the whole contents and allocating a new array? If not can you cast it to an unchecked array somehow?
I don't think you can cast it to a seq since seqs are GC-managed.
let a = cast[ptr UncheckedArray[YOUR_TYPE]](your_pointer)