haskell / attoparsec

A fast Haskell library for parsing ByteStrings
http://hackage.haskell.org/package/attoparsec
Other
512 stars 93 forks source link

Deprecation warning for `memset` and `memcpy` with `bytestring >= 0.11.5` #220

Closed andreasabel closed 2 weeks ago

andreasabel commented 1 year ago
$ cabal build --constraint='bytestring >=0.12' --allow-newer=bytestring
...
internal/Data/Attoparsec/ByteString/FastSet.hs:97:18: warning: [-Wdeprecations]
    In the use of ‘memset’
    (imported from Data.ByteString.Internal, but defined in bytestring-0.11.5.0:Data.ByteString.Internal.Type):
    Deprecated: "Use Foreign.Marshal.Utils.fillBytes instead"
   |
97 |             _ <- I.memset t 0 32
   |                  ^^^^^^^^
...
internal/Data/Attoparsec/ByteString/Buffer.hs:121:11: warning: [GHC-68441] [-Wdeprecations]
    In the use of ‘memcpy’
    (imported from Data.ByteString.Internal, but defined in Data.ByteString.Internal.Type):
    Deprecated: "Use Foreign.Marshal.Utils.copyBytes instead"
    |
121 |           memcpy (ptr0 `plusPtr` (off0+len0))
    |           ^^^^^^
...
topikettunen commented 1 year ago

Stumbled upon accidentally the same warnings, opened a quick fix at #221