File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,15 @@ performMD5Update par@(MD5Par !a !b !c !d) !bs =
141
141
{-# INLINE performMD5Update #-}
142
142
143
143
isAligned :: ByteString -> Bool
144
+ #if !MIN_VERSION_bytestring(0,11,0)
144
145
isAligned (PS _ off _) = off `rem` 4 == 0
146
+ #else
147
+ isAligned = const True
148
+ -- This is semantically equivalent to the definition above, because
149
+ -- in bytestring-0.11 offset is always 0. Note that neither definition checks
150
+ -- that a pointer (the first field of 'PS') is aligned. Anyways 'isAligned'
151
+ -- is used for optimization purposes only and does not affect correctness.
152
+ #endif
145
153
146
154
applyMD5Rounds :: MD5Partial -> ByteString -> MD5Partial
147
155
applyMD5Rounds (MD5Par a b c d) w = {-# SCC "applyMD5Rounds" #-}
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ stability: stable
12
12
build-type : Simple
13
13
cabal-version : >= 1.10
14
14
tested-with : GHC == 7.10.3
15
- extra-source-files : Test/MD5.hs
16
15
17
16
flag test
18
17
description : Build a test program
You can’t perform that action at this time.
0 commit comments