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

Ivan Raikov <[email protected]> Fri, 18 Sep 2015 09:45:22 -0700
Newsgroups gmane.comp.lang.ml.mlton.user
Message-ID <CADM5OqMPbLJ9xjzX1UbAkFJi5qPoO=UUWw-4TF+ppVDvgRyLsg@mail.gmail.com>
It's very easy to confirm that the Pointer structure is present in the
Ubuntu package:

$ dpkg -L mlton-basis | grep -i pointer
...
> /usr/lib/mlton/sml/basis/mlton/pointer.sml
> /usr/lib/mlton/sml/basis/mlton/pointer.sig
...


On Fri, Sep 18, 2015 at 2: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?
>
> Best regards,
>
> Jussi Rintanen
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> MLton-user mailing list
> [email protected]; [email protected]
> https://lists.sourceforge.net/lists/listinfo/mlton-user

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

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