[MLton-user] NLFFI: What is the correct way to convert C values to ML?

Ivan Tomac ivan.tomac at gmail.com
Mon Feb 28 21:35:02 PST 2011


MLRep structure appears to be the safest bet however it is not compatible
with that of SML/NJ which makes me wonder if it is meant to be an internal
structure, not really exposed. But if that was the case, then why is it
exposed?
Should the MLRep structures in MLton and SML/NJ versions of NLFFI lib be
updated to be compatible?

Only other option I can think of is to use types like int32_t on the C side
and Int32.toInt on the SML side, avoiding C int-s.

So what is the correct way to convert a C int to an ML int?

Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mlton.org/pipermail/mlton-user/attachments/20110301/9a7f4ba4/attachment.html


More information about the MLton-user mailing list