packages feed

HDBC-postgresql 2.4.0.0 → 2.5.0.0

raw patch · 3 files changed

+11/−4 lines, 3 filesnew-uploaderPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Changelog +## 2.5.0.0++* Add explicit call to `finalizeForeignPtr` on connection disconnects. Ensures disconnects happen at the moment close is call, as opposed to when the GC frees the ForeignPtr.+ ## 2.4.0.0  * Remove custom reference counting logic. Thanks to David Johnson.
Database/HDBC/PostgreSQL/Connection.hsc view
@@ -79,7 +79,7 @@        serverver <- pqserverVersion cconn        let clientver = #{const_str PG_VERSION}        let rconn = Impl.Connection {-                            Impl.disconnect = fdisconnect children,+                            Impl.disconnect = fdisconnect conn children,                             Impl.begin = if auto_transaction                                          then return ()                                          else begin_transaction conn children,@@ -170,8 +170,11 @@       desccol x =           error $ "Got unexpected result from pg_attribute: " ++ show x -fdisconnect :: ChildList -> IO ()-fdisconnect = closeAllChildren+fdisconnect :: Conn -> ChildList -> IO ()+fdisconnect (lock, fptr) childList = do+  closeAllChildren childList+  modifyMVar_ lock $ \_ ->+    finalizeForeignPtr fptr  foreign import ccall safe "libpq-fe.h PQconnectdb"   pqconnectdb :: CString -> IO (Ptr CConn)
HDBC-postgresql.cabal view
@@ -1,5 +1,5 @@ Name: HDBC-postgresql-Version: 2.4.0.0+Version: 2.5.0.0 License: BSD3 Maintainer: Nicolas Wu <nicolas.wu@gmail.com> Author: John Goerzen