[m-users.] foreign_type confusion on how to do it across modules...

M McDonough foolkingcrown at gmail.com
Mon Jul 15 08:54:58 AEST 2019


On Sun, Jul 14, 2019 at 3:13 PM Zoltan Somogyi <zoltan.somogyi at runbox.com>
wrote:

> How would the Mercury compiler know what to unbox? Given that most foreign
> types
> are typedef'd names, it has no idea which foreign types are pointers and
> which are not.
>
> Zoltan.
>

I thought that it gets stored as MR_Word which is GC malloc'ed using
sizeof() on
the native type, and in the prologue there is a macro which ends up being a
memcpy into a local struct in that case?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20190714/7032b727/attachment.html>


More information about the users mailing list