mdbx: separete DKBUF and DKBUF_DEBUG.

Change-Id: I8d90909ce9c5faec176a12e68f7bab6c2ea1d317
This commit is contained in:
Leonid Yuriev
2021-03-27 12:28:23 +03:00
parent bfc9921305
commit 83cd4f7d58
2 changed files with 53 additions and 49 deletions

View File

@@ -1229,15 +1229,18 @@ static __maybe_unused __inline void mdbx_jitter4testing(bool tiny) {
/* Key size which fits in a DKBUF (debug key buffer). */
#define DKBUF_MAX 511
#if MDBX_DEBUG
#define DKBUF char _kbuf[DKBUF_MAX * 4 + 2]
#define DKEY(x) mdbx_dump_val(x, _kbuf, DKBUF_MAX * 2 + 1)
#define DVAL(x) mdbx_dump_val(x, _kbuf + DKBUF_MAX * 2 + 1, DKBUF_MAX * 2 + 1)
#if MDBX_DEBUG
#define DKBUF_DEBUG DKBUF
#define DKEY_DEBUG(x) DKEY(x)
#define DVAL_DEBUG(x) DVAL(x)
#else
#define DKBUF ((void)(0))
#define DKEY(x) ("-")
#define DVAL(x) ("-")
#define DKBUF_DEBUG ((void)(0))
#define DKEY_DEBUG(x) ("-")
#define DVAL_DEBUG(x) ("-")
#endif
/* An invalid page number.