Skip to content
Snippets Groups Projects
Commit 89f6bc6d authored by Ben Gamari's avatar Ben Gamari
Browse files

base: Don't use Data.ByteString.Internals.memcpy

This function is now deprecated from `bytestring`. Use
`Foreign.Marshal.Utils.copyBytes` instead.

Fixes #23880.

(cherry picked from commit 6ccd9d65)
parent ae38fa41
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ import Foreign
#if defined(HAVE_LIBZSTD)
import Foreign.C.Types
import Foreign.Marshal.Utils (copyBytes)
import qualified Data.ByteString.Internal as BSI
import GHC.IO (unsafePerformIO)
#endif
......@@ -274,7 +275,7 @@ compress clvl (BSI.PS srcForeignPtr off len) = unsafePerformIO $
(srcPtr `plusPtr` off)
(fromIntegral len)
(fromIntegral clvl)
BSI.create compressedSize $ \p -> BSI.memcpy p dstPtr compressedSize
BSI.create compressedSize $ \p -> copyBytes p dstPtr compressedSize
foreign import ccall unsafe "ZSTD_compress"
zstd_compress ::
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment