[MLton-user] FFI, MacOS PPC, and 16-bit ints
Matthew Fluet
fluet at tti-c.org
Fri Dec 14 14:55:27 PST 2007
On Tue, 27 Nov 2007, Dave Herman wrote:
> On PPC MacOS, I can't seem to mutate Int16.int refs from C via the FFI. The
> program below successfully mutates the ordinary int ref to 42, but does not
> mutate the Int16.int ref.
I've committed a fix for this bug.
http://mlton.org/cgi-bin/viewsvn.cgi?rev=6267&view=rev
By inspecting the intermediate representation code, I'm pretty sure this
will behave the right way on big-endian systems, but I don't have access
to one to check. I've tweaked the <src>/doc/examples/ffi examples to pass
a 'char ref' through the FFI, so the Makefile in that directory can be
used as a regression check.
More information about the MLton-user
mailing list