summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHallvard Furuseth <hallvard@openldap.org>2016-01-28 19:45:01 +0100
committerHallvard Furuseth <hallvard@openldap.org>2016-01-28 19:45:01 +0100
commite394e023e491ca0338ad1f485fd70a9dd3790ed2 (patch)
treecf4b95155a7b6fd7c6554fb24ce4e580bf33ccfd
parent3f62ddc81c891f10c65b672e268ff2cb2b5fe228 (diff)
downloadlmdb-e394e023e491ca0338ad1f485fd70a9dd3790ed2.tar.gz
lmdb-e394e023e491ca0338ad1f485fd70a9dd3790ed2.tar.bz2
lmdb-e394e023e491ca0338ad1f485fd70a9dd3790ed2.zip
Fix MDB_VL32 mdb_cursor_count()/entrycount types
-rw-r--r--libraries/liblmdb/lmdb.h2
-rw-r--r--libraries/liblmdb/mdb.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/libraries/liblmdb/lmdb.h b/libraries/liblmdb/lmdb.h
index 7bcdb9c..ee37561 100644
--- a/libraries/liblmdb/lmdb.h
+++ b/libraries/liblmdb/lmdb.h
@@ -1544,7 +1544,7 @@ int mdb_cursor_del(MDB_cursor *cursor, unsigned int flags);
* <li>EINVAL - cursor is not initialized, or an invalid parameter was specified.
* </ul>
*/
-int mdb_cursor_count(MDB_cursor *cursor, size_t *countp);
+int mdb_cursor_count(MDB_cursor *cursor, mdb_size_t *countp);
/** @brief Compare two data items according to a particular database.
*
diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c
index 986980a..3552c73 100644
--- a/libraries/liblmdb/mdb.c
+++ b/libraries/liblmdb/mdb.c
@@ -1075,7 +1075,7 @@ typedef struct MDB_db {
pgno_t md_branch_pages; /**< number of internal pages */
pgno_t md_leaf_pages; /**< number of leaf pages */
pgno_t md_overflow_pages; /**< number of overflow pages */
- pgno_t md_entries; /**< number of data items */
+ mdb_size_t md_entries; /**< number of data items */
pgno_t md_root; /**< the root page of this tree */
} MDB_db;
@@ -7545,7 +7545,7 @@ new_sub:
*/
if (do_sub) {
int xflags, new_dupdata;
- size_t ecount;
+ mdb_size_t ecount;
put_sub:
xdata.mv_size = 0;
xdata.mv_data = "";
@@ -8260,7 +8260,7 @@ mdb_cursor_renew(MDB_txn *txn, MDB_cursor *mc)
/* Return the count of duplicate data items for the current key */
int
-mdb_cursor_count(MDB_cursor *mc, size_t *countp)
+mdb_cursor_count(MDB_cursor *mc, mdb_size_t *countp)
{
MDB_node *leaf;