Re: pointers in FFI, differences between MLton 2010 and 2013 versions

Matthew Fluet <[email protected]> Sat, 19 Sep 2015 15:52:06 -0400
Newsgroups gmane.comp.lang.ml.mlton.user
Message-ID <CAMrhFL6+g0N-YN1eM1Q515dmaLHvPHi6zZOymHHRnya1gebY9w@mail.gmail.com>
On Fri, Sep 18, 2015 at 5:45 AM, Dr. Jussi Rintanen
<[email protected]> wrote:
> 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?

With regards to documentation, generally mlton.org follows the
development version of MLton: documentation changes should be
committed with feature commits and the website is built automatically
from the current sources.  However, we archive the documentation
specific to each release:  http://mlton.org/guide/20100608 has the
documentation at the time of the 20100608 release and
http://mlton.org/guide/20130715 has the documentation at the time of
the 20130715 release.

The MLton.Pointer structure is documented at
http://www.mlton.org/MLtonPointer (and
http://mlton.org/guide/20100608/MLtonPointer and
http://mlton.org/guide/20130715/MLtonPointer).

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

------------------------------------------------------------------------------