summaryrefslogtreecommitdiff
path: root/libraries/base/GHC/ForeignPtr.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-08-02 11:40:17 +0100
committerSimon Marlow <marlowsd@gmail.com>2012-08-02 11:40:17 +0100
commit855ef7348686aabf6222b8251c41dfe86fa4bcb0 (patch)
tree3a66b386f75d9bacf1ed7e17424ca475ecb9c234 /libraries/base/GHC/ForeignPtr.hs
parentd19e3e035aecf014d7a1f9b1a3a74992e8e57653 (diff)
downloadhaskell-855ef7348686aabf6222b8251c41dfe86fa4bcb0.tar.gz
Document that a FinalizerPtr is a pointer to a ccall function (#5254)
It can't be any other calling convention, e.g. stdcall.
Diffstat (limited to 'libraries/base/GHC/ForeignPtr.hs')
-rw-r--r--libraries/base/GHC/ForeignPtr.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/libraries/base/GHC/ForeignPtr.hs b/libraries/base/GHC/ForeignPtr.hs
index 244e0fd14e..7e723153cb 100644
--- a/libraries/base/GHC/ForeignPtr.hs
+++ b/libraries/base/GHC/ForeignPtr.hs
@@ -114,6 +114,8 @@ instance Show (ForeignPtr a) where
-- finalisation time, gets as an argument a plain pointer variant of the
-- foreign pointer that the finalizer is associated with.
--
+-- Note that the foreign function /must/ use the @ccall@ calling convention.
+--
type FinalizerPtr a = FunPtr (Ptr a -> IO ())
type FinalizerEnvPtr env a = FunPtr (Ptr env -> Ptr a -> IO ())