From: Simon Marlow Date: Tue, 13 Jul 2010 13:24:03 +0000 (+0000) Subject: mention that IntPtr and WordPtr can be marshalled to/from intptr_t and uintptr_t X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=2db6d8442a1c68ed89ff3d718ad34850904705cb;p=ghc-base.git mention that IntPtr and WordPtr can be marshalled to/from intptr_t and uintptr_t --- diff --git a/Foreign/Ptr.hs b/Foreign/Ptr.hs index 7ada44c..8dd220f 100644 --- a/Foreign/Ptr.hs +++ b/Foreign/Ptr.hs @@ -105,12 +105,14 @@ foreign import ccall unsafe "freeHaskellFunctionPtr" # ifdef __GLASGOW_HASKELL__ -- | An unsigned integral type that can be losslessly converted to and from --- @Ptr@. +-- @Ptr@. This type is also compatible with the C99 type @uintptr_t@, and +-- can be marshalled to and from that type safely. INTEGRAL_TYPE(WordPtr,tyConWordPtr,"WordPtr",Word) -- Word and Int are guaranteed pointer-sized in GHC -- | A signed integral type that can be losslessly converted to and from --- @Ptr@. +-- @Ptr@. This type is also compatible with the C99 type @intptr_t@, and +-- can be marshalled to and from that type safely. INTEGRAL_TYPE(IntPtr,tyConIntPtr,"IntPtr",Int) -- Word and Int are guaranteed pointer-sized in GHC