mirror of
https://github.com/isar/libmdbx.git
synced 2025-10-25 01:08:56 +08:00
mdbx: separete DKBUF and DKBUF_DEBUG.
Change-Id: I8d90909ce9c5faec176a12e68f7bab6c2ea1d317
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user