add signature to compat popCount
This commit is contained in:
parent
410373ec26
commit
7c6adacef9
@ -45,6 +45,7 @@ foreign import ccall "cryptonite_scrypt_smix"
|
||||
ccryptonite_scrypt_smix :: Ptr Word8 -> Word32 -> Word64 -> Ptr Word8 -> Ptr Word8 -> IO ()
|
||||
|
||||
#if !(MIN_VERSION_base(4,5,0))
|
||||
popCount :: Word64 -> Int
|
||||
popCount n = loop 0 n
|
||||
where loop c 0 = c
|
||||
loop c i = loop (c + if testBit c 0 then 1 else 0) (i `shiftR` 1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user