[Git][ghc/ghc][master] base: Don't use Data.ByteString.Internals.memcpy

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Aug 23 12:42:36 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
6ccd9d65 by Ben Gamari at 2023-08-23T08:42:05-04:00
base: Don't use Data.ByteString.Internals.memcpy

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

Fixes #23880.

- - - - -


1 changed file:

- compiler/GHC/StgToCmm/InfoTableProv.hs


Changes:

=====================================
compiler/GHC/StgToCmm/InfoTableProv.hs
=====================================
@@ -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 ::



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6ccd9d657b33bc6237d8e046ca3b07c803645130

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6ccd9d657b33bc6237d8e046ca3b07c803645130
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230823/841508f7/attachment-0001.html>


More information about the ghc-commits mailing list