mdbx: rename MDBX_LAST_LMDB_ERRCODE and fix description.

Change-Id: I9a855871ae8821d0d10472c48b5467fd507c01a5
This commit is contained in:
Leonid Yuriev 2020-02-01 23:38:16 +03:00
parent 1cbad5bd3f
commit db27654330
3 changed files with 5 additions and 5 deletions

6
mdbx.h
View File

@ -1447,13 +1447,13 @@ typedef enum MDBX_cursor_op {
/* Unexpected problem - txn should abort */ /* Unexpected problem - txn should abort */
#define MDBX_PROBLEM (-30779) #define MDBX_PROBLEM (-30779)
/* The last LMDB-compatible defined error code */
#define MDBX_LAST_LMDB_ERRCODE MDBX_PROBLEM
/* Another write transaction is running or environment is already used while /* Another write transaction is running or environment is already used while
* opening with MDBX_EXCLUSIVE flag */ * opening with MDBX_EXCLUSIVE flag */
#define MDBX_BUSY (-30778) #define MDBX_BUSY (-30778)
/* The last defined error code */
#define MDBX_LAST_ERRCODE MDBX_BUSY
/* The mdbx_put() or mdbx_replace() was called for key, /* The mdbx_put() or mdbx_replace() was called for key,
* that has more that one associated value. */ * that has more that one associated value. */
#define MDBX_EMULTIVAL (-30421) #define MDBX_EMULTIVAL (-30421)

View File

@ -3205,7 +3205,7 @@ static const char *__mdbx_strerr(int errnum) {
"environment is already used while opening with MDBX_EXCLUSIVE flag", "environment is already used while opening with MDBX_EXCLUSIVE flag",
}; };
if (errnum >= MDBX_KEYEXIST && errnum <= MDBX_LAST_ERRCODE) { if (errnum >= MDBX_KEYEXIST && errnum <= MDBX_LAST_LMDB_ERRCODE) {
int i = errnum - MDBX_KEYEXIST; int i = errnum - MDBX_KEYEXIST;
return tbl[i]; return tbl[i];
} }

View File

@ -1165,7 +1165,7 @@ MDBX_INTERNAL_FUNC void mdbx_rthc_thread_dtor(void *ptr);
((rc) != MDBX_RESULT_TRUE && (rc) != MDBX_RESULT_FALSE) ((rc) != MDBX_RESULT_TRUE && (rc) != MDBX_RESULT_FALSE)
/* Internal error codes, not exposed outside libmdbx */ /* Internal error codes, not exposed outside libmdbx */
#define MDBX_NO_ROOT (MDBX_LAST_ERRCODE + 10) #define MDBX_NO_ROOT (MDBX_LAST_LMDB_ERRCODE + 10)
/* Debugging output value of a cursor DBI: Negative in a sub-cursor. */ /* Debugging output value of a cursor DBI: Negative in a sub-cursor. */
#define DDBI(mc) \ #define DDBI(mc) \