packages feed

mongoDB 0.4 → 0.4.1

raw patch · 2 files changed

+6/−5 lines, 2 files

Files

Database/MongoDB/BSON.hs view
@@ -294,10 +294,11 @@ putVal (BsonArray es)   = putOutterObj bs     where bs = runPut $ forM_ (List.zip [(0::Int) .. ] es) $ \(i, e) ->                putType e >> putS (L8.fromString $ show i) >> putVal e-putVal (BsonBinary t bs)= do putI32 $ fromIntegral $ 4 + L.length bs-                             putI8 $ fromBinarySubType t-                             putI32 $ fromIntegral $ L.length bs-                             putLazyByteString bs+putVal (BsonBinary t bs) = do+  putI32 $ fromIntegral $ (if t == BSTByteArray then 4 else 0) + L.length bs+  putI8 $ fromBinarySubType t+  when (t == BSTByteArray) $ putI32 $ fromIntegral $ L.length bs+  putLazyByteString bs putVal BsonUndefined    = putNothing putVal (BsonObjectId o) = putWord64be (fromIntegral $ o `shiftR` 32) >>                           putWord32be (fromIntegral $ o .&. 0xffffffff)
mongoDB.cabal view
@@ -1,5 +1,5 @@ Name:                mongoDB-Version:             0.4+Version:             0.4.1 License:             MIT Maintainer:          Scott Parish <srp@srparish.net> Author:              Scott Parish <srp@srparish.net>