From 58b0ce50b3a4d76dd0f5c1ed780a75db54549558 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Tue, 2 Aug 2016 21:04:17 +0200 Subject: [PATCH] mdb_size comments --- libraries/liblmdb/lmdb.h | 5 +++++ libraries/liblmdb/mdb.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libraries/liblmdb/lmdb.h b/libraries/liblmdb/lmdb.h index 27821017ca..30d586203a 100644 --- a/libraries/liblmdb/lmdb.h +++ b/libraries/liblmdb/lmdb.h @@ -187,6 +187,11 @@ typedef mode_t mdb_mode_t; #endif #ifndef MDB_VL32 +/** Unsigned type used for mapsize, entry counts and page/transaction IDs. + * + * It is normally size_t, hence the name. Defining MDB_VL32 makes it + * uint64_t, but do not try this unless you know what you are doing. + */ typedef size_t mdb_size_t; # define MDB_SIZE_MAX SIZE_MAX /**< max #mdb_size_t */ /** #mdb_size_t printf formats, \b t = one of [diouxX] without quotes */ diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 0d2889fd29..8e5b907015 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -5414,7 +5414,7 @@ mdb_env_close(MDB_env *env) free(env); } -/** Compare two items pointing at aligned mdb_size_t's */ +/** Compare two items pointing at aligned #mdb_size_t's */ static int mdb_cmp_long(const MDB_val *a, const MDB_val *b) { @@ -5425,7 +5425,7 @@ mdb_cmp_long(const MDB_val *a, const MDB_val *b) /** Compare two items pointing at aligned unsigned int's. * * This is also set as #MDB_INTEGERDUP|#MDB_DUPFIXED's #MDB_dbx.%md_dcmp, - * but #mdb_cmp_clong() is called instead if the data type is mdb_size_t. + * but #mdb_cmp_clong() is called instead if the data type is #mdb_size_t. */ static int mdb_cmp_int(const MDB_val *a, const MDB_val *b) -- 2.39.5