Well, I implied that we need to amend Poly/ML C FFI in such a way that
pointers will be treated efficiently and with minimal program code.
On 05.10.14 20:39, Phil Clayton wrote:
I'm fairly sure that whatever integer type you use to hold a pointer,
it's going to get converted to a vol at the C
I'm fairly sure that whatever integer type you use to hold a pointer,
it's going to get converted to a vol at the C interface anyway - inside
a conversion are functions to convert from/to vols. Also, the supplied
conversions for integer types work with IntInf.int, e.g.
LONG : IntInf.int
I would suggest that you don't actually want an ML integer type to hold
your C pointers. The main reason is that you would lose some
type-safety because type checking would not detect accidental use of an
integer as a pointer (and vice-versa).
What you should want in ML is an abstract type
Hello.
As I can see, there is no address type. The suggested conversion for C
pointers (POINTER : vol Conversion) converts a C pointer to vol.
As follows from
http://www.polyml.org/docs/CInterface.html#17%20Volatile%20Implementation
, vol contains an address of a heap object. If its boolean