1. Bryan O'Sullivan
  2. attoparsec

Commits

Bryan O'Sullivan  committed 02863e7

Improve compatibility with older GHC

  • Participants
  • Parent commits ef59562
  • Branches default

Comments (0)

Files changed (1)

File Data/Attoparsec/ByteString/Buffer.hs

View file
  • Ignore whitespace
             then do
               memcpy (ptr0 `plusPtr` (off0+len0))
                      (ptr1 `plusPtr` off1)
-                     len1
+                     (fromIntegral len1)
               return (Buf fp0 off0 newlen cap0)
             else do
               let newcap = newlen * 2
               fp <- mallocPlainForeignPtrBytes newcap
               withForeignPtr fp $ \ptr -> do
-                memcpy ptr (ptr0 `plusPtr` off0) len0
-                memcpy (ptr `plusPtr` len0) (ptr1 `plusPtr` off1) len1
+                memcpy ptr (ptr0 `plusPtr` off0) (fromIntegral len0)
+                memcpy (ptr `plusPtr` len0) (ptr1 `plusPtr` off1)
+                       (fromIntegral len1)
               return (Buf fp 0 newlen newcap)
 
     mconcat [] = mempty