packages feed

geoip2 0.2.0.0 → 0.2.0.1

raw patch · 3 files changed

+6/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,8 @@+# 0.2.0.1+- Fixed a problem with correct decoding of 28-bit offsets+ # 0.2.0.0-Changed interface to normal Either String GeoResult+- Changed interface to normal Either String GeoResult  # 0.1.0.3 -> 0.1.0.4 - Removed lru
Data/GeoIP2/SearchTree.hs view
@@ -25,7 +25,7 @@     bytes = BS.take (fromIntegral bytecount) $ BS.drop (fromIntegral $ index * bytecount) mem     num = BS.foldl' (\acc new -> fromIntegral new + 256 * acc) 0 bytes :: Word64     -- 28 bits has a strange record format-    left28 = num `shift` (-32) .|. (num .&. 0xf0000000)+    left28 = num `shift` (-32) .|. (num .&. 0xf0000000) `shift` (-4)   in case recordbits of       28 -> (fromIntegral left28, fromIntegral (num .&. ((1 `shift` recordbits) - 1)))       _  -> (fromIntegral (num `shift` negate recordbits), fromIntegral (num .&. ((1 `shift` recordbits) - 1)))
geoip2.cabal view
@@ -1,5 +1,5 @@ name:                geoip2-version:             0.2.0.0+version:             0.2.0.1 synopsis:            Pure haskell interface to MaxMind GeoIP database description:   GeoIP2 is a haskell binding to the MaxMind GeoIP2 database.