Jeremy Yallop

Results 75 issues of Jeremy Yallop

In the long run it might be easier to maintain ocamlbuild rules than the current fairly complex makefiles. @whitequark: do you know if switching to ocamlbuild is likely to have...

Currently `ctypes.foreign` [doesn't support](https://github.com/ocamllabs/ocaml-ctypes/blob/372d0f5e/src/ctypes-foreign-base/ffi.ml#L57) passing or returning structs with array members, since there's no direct support for adding array members to structs in [libffi](http://www.atmark-techno.com/~yashi/libffi.html#Structures). If it's safe to assume that...

A few parts of the code are preprocessor-conditionalized by platform, e.g. [posix_types_stubs.c](https://github.com/ocamllabs/ocaml-ctypes/blob/85439bf81eddc66e810e34bca628f6ac36e5bdb0/src/ctypes/posix_types_stubs.c#L18): ```C #if (!defined _WIN32 || defined __CYGWIN__) && !defined MINIOS ``` and [ldouble_stubs.c](https://github.com/ocamllabs/ocaml-ctypes/blob/85439bf81eddc66e810e34bca628f6ac36e5bdb0/src/ctypes/ldouble_stubs.c#L547): ```C #ifdef __ANDROID__ ``` It'd...

patches welcome

The current documentation doesn't make the behaviour clear. For example, how should one build and call a function from a `static_funptr`? An indication of common ways to use the type...

documentation

The fields of structs whose layout is retrieved from C via [`Cstubs_structs`](https://github.com/ocamllabs/ocaml-ctypes/blob/bd1726822fc95429cc8c0293149397fdb9f6ec9d/src/cstubs/cstubs_structs.mli) should be ordered by offset. Field order shows up when printing types -- in the top level, for...

patches welcome

It's common for APIs to expose typedefs that resolve to different types in different circumstances. For example, `time_t` might denote a signed integer type on one platform, an unsigned integer...

A suggestion of @avsm's [from](http://lists.ocaml.org/pipermail/ctypes/2015-May/000167.html) the mailing list: > Creating a standard ocamlbuild plugin would be useful given the recent addition of -plugin-tags to ocamlbuild. > > Eliom uses this...

enhancement

See - https://github.com/mirage/mirage/issues/479 - [ctypes-build-disable-shared.patch ](https://github.com/mato/opam-rumprun/blob/ecae90a2cafaf1bfae265e66eb5b914871868225/packages/ctypes-rumprun.0.4.1/files/patches/ctypes-build-disable-shared.patch) in the [opam-rumprun](https://github.com/mato/opam-rumprun/) repository.

enhancement

A common pattern in C libraries is to make the final member of a struct an array whose length is determined at runtime, like this example from the sanlock library:...

Since `libffi` computes the layout of structs passed to C we should ensure that only structs with computed layout (not layout retrieved via [`Cstubs_structs`](c)) can be passed to functions using...