pointers in FFI, differences between MLton 2010 and 2013 versions
"Dr. Jussi Rintanen" <[email protected]> Fri, 18 Sep 2015 12:45:56 +0300
| Newsgroups | gmane.comp.lang.ml.mlton.user |
|---|---|
| Message-ID | <[email protected]> |
I was trying to get pointers from C functions through the FFI and pass them back in later function calls, and ran into difficulties. FFI documentation at http://mlton.org/ForeignFunctionInterfaceTypes claims that there is a type MLton.Pointer.t for handling C pointers. I presume this means arbitrary pointers. Other documentation at mlton.org does not confirm the existence of a top-level MLton.Pointer structure, and my mlton complains that "Undefined structure MLton." This is MLton 20100608 (built Sun Oct 27 04:18:37 UTC 2013 on allspice) as available through Ubuntu. Guys at Ubuntu are unwilling to upgrade to the 20130715 version of MLton (unless major bugs are fixed in that version, or there is some other compelling reason to upgrade), but, it is not clear whether MLton.Pointer would exist there either, as the 2013 version release notes and ChangeLog do not mention any changes related to this structure. Can anyone help? What type to use for the pointers _in_the_20100608_ MLton version? Is it different in the 20130715 version? Is the FFI documentation up to date? Best regards, Jussi Rintanen ------------------------------------------------------------------------------