More Finaliser Trouble

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Jul 14 03:18:32 EDT 2003


On 13-Jul-2003, Wolfgang Thaller <wolfgang.thaller at gmx.net> wrote:
> Daan Leijen <daanleijen at xs4all.nl> wrote:
> 
> >(allthough it doesn't answer the question of  [...] how to add parameters 
> >to the new newForeignPtr function,)
> 
> Should there perhaps be something like ...
> 
> newForeignPtrWithUserData :: Ptr a -> Ptr b -> FunPtr (Ptr a -> Ptr b -> IO 
> ()) -> IO (ForeignPtr a)
> 
> ... where the second argument is a "userData" pointer that gets passed on 
> to the finalizer?

IMHO yes!

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.



More information about the FFI mailing list