mdbx: using enum instead of #define for flags/modes.

Resolve https://github.com/erthink/libmdbx/issues/108

Change-Id: I45897300375d2b5b9361aaba81dadcf9801fe3cf
This commit is contained in:
Leonid Yuriev
2020-07-08 02:26:46 +03:00
parent 2e0d2e65af
commit 9720ed39f5
8 changed files with 955 additions and 743 deletions

View File

@@ -37,8 +37,8 @@ void __noreturn failure_perror(const char *what, int errnum) {
//-----------------------------------------------------------------------------
static void mdbx_logger(int priority, const char *function, int line,
const char *msg, va_list args) {
static void mdbx_logger(MDBX_log_level_t priority, const char *function,
int line, const char *msg, va_list args) {
if (!function)
function = "unknown";
@@ -60,7 +60,7 @@ static FILE *last;
void setlevel(loglevel priority) {
level = priority;
int rc = mdbx_setup_debug(priority,
int rc = mdbx_setup_debug(MDBX_log_level_t(priority),
MDBX_DBG_ASSERT | MDBX_DBG_AUDIT | MDBX_DBG_JITTER,
mdbx_logger);
log_trace("set mdbx debug-opts: 0x%02x", rc);