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

M McDonough foolkingcrown at gmail.com
Sun Jul 14 12:23:55 AEST 2019


 > In C, the allocation should be done with the MR_GC_NEW macro,
> which is defined in runtime/mercury_memory.h, or its MR_GC_NEW_ATTRIB
> variant, which help with memory profiling.

The foreign_proc should unbox the struct (if it's not a pointer type) for
you in the C function prologue it writes, shouldn't it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20190713/26a4a308/attachment.html>


More information about the users mailing list