Proposed change to ForeignPtr
alastair at reid-consulting-uk.ltd.uk
Fri Aug 9 06:38:08 EDT 2002
> I assume you meant
> makeForeignPtr :: Ptr a -> FunPtr (Ptr a -> IO ()) -> IO (ForeignPtr a)
> What do you expect to happen if the finaliser calls a foreign
> exported function?
I do not expect that to work on any platform that has difficulty
implementing newForeignPtr (because you could use it to implement
I don't know if it would be likely to work on GHC.
I think the spec should say that it is an error or undefined
depending on whether GHC supports reentrant finalizers or not.
> That's a tricky one. From the standards point of view, I am
> actually *very* reluctant to introduce new names. On the other
> hand, reusing the old names will lead to a couple of unhappy emails
> from people using the old interface again.
But only a couple I conjecture.
Alastair Reid alastair at reid-consulting-uk.ltd.uk
Reid Consulting (UK) Limited http://www.reid-consulting-uk.ltd.uk/alastair/
More information about the FFI