[project @ 2005-06-27 22:31:41 by simonmar]
authorsimonmar <unknown>
Mon, 27 Jun 2005 22:31:41 +0000 (22:31 +0000)
committersimonmar <unknown>
Mon, 27 Jun 2005 22:31:41 +0000 (22:31 +0000)
commit180df3420fa0b46ffffc091946fe6ba6914df08a
tree9410da05d82253ad06533969a6418a182513aa8c
parentb7e861ce34a4d50c777db284cf650f55b58a16a3
[project @ 2005-06-27 22:31:41 by simonmar]
As discussed on ghc-users some time ago, optimise the representation
of ForeignPtr to make withForeignPtr more efficient.  ForeignPtr is
now represented by a pair of an Addr# and a ForeignPtrContents object.

withForeignPtr just extracts the Addr# and touches the
ForeignPtrContents.

ForeignPtr no longer uses the primitive ForeignObj# type: it isn't
required, since we attach the finalizer to the IORef inside
ForeignPtrContents now.  In fact, the ForeignObj# type is now
obsolete, and can be removed.
GHC/ForeignPtr.hs