Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove internal uses of
withForeignPtr
(#536)
* Avoid 'withForeignPtr' via 'createf' and variants * remove stupid/wrong temporary cpp * Move new utilities into D.B.Internal.Utils * Move unsafeWithForeignPtr shim into Utils * Fix imports for unsafeWithForeignPtr shim The error messages from ghc-8.0 weren't red, so I didn't notice them. Silly stuff. * Clean up potentially-sketchy unsafeWithForeignPtr uses * Revert documentation change to createAndTrim * Revert "Fix imports for unsafeWithForeignPtr shim" This reverts commit b6b4de6. Revert "Move unsafeWithForeignPtr shim into Utils" This reverts commit 6df394e. Revert "Move new utilities into D.B.Internal.Utils" This reverts commit 6462e4f. * Rename ForeignPtr helpers to use "Fp" suffix * [NONBUILDABLE] rename Data.ByteString.Internal to Data.ByteString.Internal.Type. The re-export-only compatibility module to replace it at Data.ByteString.Internal is intentionally deleted from this commit, to allow for a more reviewable diff. * Add compatibility stub "Data.ByteString.Internal" * Replace Data.ByteString.Internal.Type's description * Remove the use of withRawBuffer, too. It has the same performance issues as does withForeignPtr. Co-authored-by: Matthew Craven <[email protected]>
- Loading branch information