> 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 <[EMAIL PROTECTED]> wrote: > 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 _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
