ForeignObj.makeForeignObj

Sigbjorn Finne sof at microsoft.com
Sun Oct 29 21:03:57 EST 2000


isn't right in 4.08 (or the CVS repo.) If the assumption is that ForeignObj
cannot be mutated once created (which looks like being the case now since
writeForeignObj is marked as deprecated), the defn should be something like:

makeForeignObj :: Addr -> Addr -> IO ForeignObj
makeForeignObj adr finAdr = newForeignObj adr (ap0 finAdr adr)

foreign import dynamic ap0 :: Addr -> Addr -> IO ()

In the current version the finaliser isn't parameterised with the finalised
pointer.

--sigbjorn





More information about the Glasgow-haskell-bugs mailing list