
9 Jun
2008
9 Jun
'08
7:16 p.m.
type Notify = Sigval -> IO () foreign import ccall "wrapper" mkNotify :: Notify -> IO (FunPtr Notify)
then
main = do notifyFPtr <- mkNotify notifyFunc -- rest of code here
-- then, when you are done and nothing is referencing the pointer any more freeHaskellFunPtr notifyFPtr
On 6/9/08, Galchin, Vasili
In any case, what I want to do is store FunPtr in a data type and marshall into a C struct as a C function pointer.
Vasili
This will be suitable for that purpose. -- ryan