projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ccc7548
)
mention that IntPtr and WordPtr can be marshalled to/from intptr_t and uintptr_t
author
Simon Marlow
<marlowsd@gmail.com>
Tue, 13 Jul 2010 13:24:03 +0000
(13:24 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Tue, 13 Jul 2010 13:24:03 +0000
(13:24 +0000)
Foreign/Ptr.hs
patch
|
blob
|
history
diff --git
a/Foreign/Ptr.hs
b/Foreign/Ptr.hs
index
7ada44c
..
8dd220f
100644
(file)
--- 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
# 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
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
INTEGRAL_TYPE(IntPtr,tyConIntPtr,"IntPtr",Int)
-- Word and Int are guaranteed pointer-sized in GHC