]> git.sur5r.net Git - openldap/blobdiff - libraries/liblmdb/mdb.c
ITS#7660 Add mdb_txn_env to API
[openldap] / libraries / liblmdb / mdb.c
index 02c7f067e37ae1dc312a5a3ebd0c3fae5acedc9a..e0916a1bf0a2bb54720f2a747712ff78211e929b 100644 (file)
@@ -2307,6 +2307,13 @@ mdb_txn_begin(MDB_env *env, MDB_txn *parent, unsigned int flags, MDB_txn **ret)
        return rc;
 }
 
+MDB_env *
+mdb_txn_env(MDB_txn *txn)
+{
+       if(!txn) return NULL;
+       return txn->mt_env;
+}
+
 /** Export or close DBI handles opened in this txn. */
 static void
 mdb_dbis_update(MDB_txn *txn, int keep)