diff options
author | Adam Sandberg Ericsson <adam@sandbergericsson.se> | 2022-06-18 10:01:22 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-07-07 23:24:34 -0400 |
commit | 42c917df5be8d75f79a283a8ed59fbaf099bc973 (patch) | |
tree | 9efeae5f39cd9c8ff49ec68ceb3b9f5f5a6ee2cf /libraries/base | |
parent | fa59223b05e24d6e477e3ab0ab296e32b2b65a8b (diff) | |
download | haskell-42c917df5be8d75f79a283a8ed59fbaf099bc973.tar.gz |
rts: allow NULL to be used as an invalid StgStablePtr
Diffstat (limited to 'libraries/base')
-rw-r--r-- | libraries/base/GHC/Stable.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libraries/base/GHC/Stable.hs b/libraries/base/GHC/Stable.hs index fd4534133c..4c8123e07c 100644 --- a/libraries/base/GHC/Stable.hs +++ b/libraries/base/GHC/Stable.hs @@ -44,6 +44,8 @@ garbage collection (ordinary references may be relocated during garbage collection). Consequently, stable pointers can be passed to foreign code, which can treat it as an opaque reference to a Haskell value. +The @StablePtr@ 0 is reserved for representing NULL in foreign code. + A value of type @StablePtr a@ is a stable pointer to a Haskell expression of type @a@. -} |