From 2db6d8442a1c68ed89ff3d718ad34850904705cb Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Tue, 13 Jul 2010 13:24:03 +0000 Subject: [PATCH] mention that IntPtr and WordPtr can be marshalled to/from intptr_t and uintptr_t --- Foreign/Ptr.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 1.7.10.4