exercising the storage manager

Manuel M T Chakravarty chak at cse.unsw.edu.au
Tue Jun 10 11:32:22 EDT 2003


Peter Gammie <peteg at cse.unsw.edu.au> wrote,

> On Tue, 10 Jun 2003, Simon Marlow wrote:
> 
> > Does anyone else think that foreignPtrToPtr should really be called
> > unsafeForeignPtrToPtr?
> 
> I was actually advocating that it be disposed of, but thought that would
> be too forward of me. What use is it without touchForeignPtr, and if the
> latter depends on strictness anyway, how many uses of it are safe and
> aren't captured by withForeignPtr?

We had this discussion before.  foreignPtrToPtr is mainly
useful for generators and, yes, you need to combine it with
touchForeignPtr.

Manuel



More information about the FFI mailing list