Jeremy Yallop

Results 198 comments of Jeremy Yallop

This isn't currently supported, because the current approach makes it difficult to ensure that the GC won't move the array at an inconvenient moment. Stub generation (#15) is likely to...

We should be able to support this using @whitequark's approach for strings (#143). There's an additional [difficulty regarding alignment](https://github.com/ocamllabs/ocaml-ctypes/pull/143#issuecomment-42619191), which we can work around by falling back to a copy....

It would be useful to be able to pass arrays. I think it's probably possible to fix (and similarly for bigarrays).

This is actually expected behaviour. The short summary as to why it occurs is that the [string](http://ocamllabs.github.io/ocaml-ctypes/Ctypes.html#VALstring) view copies values into C storage, which is reclaimed by the GC since...

Ok, let's make it clear in the documentation that the GC problem in question concerns movability/stability, not (e.g.) lifetime. How about "To avoid passing references to (movable) OCaml objects to...

This would be nice to have, and `Cstubs_structs.write_c_for_cross_compilation` seems like a reasonable place to put it. One question is whether to switch the whole process over to use @whitequark's approach...

> `puts(" | Struct ({ tag = \"\"; spec = Incomplete _ } as s') ->");` This will require changing how we do things, since the generated pattern will match...

There's a partial fix in #467.