mdbx: add MDBX_PGWALK-tags and refine pgwalk internals.

Change-Id: I1f4eb79463dc6eec3d94d43baab0b28ceefa8c03
This commit is contained in:
Leonid Yuriev
2019-06-19 14:40:35 +03:00
parent ce0e5d67f5
commit c05702eacf
3 changed files with 33 additions and 30 deletions

4
mdbx.h
View File

@@ -1666,6 +1666,10 @@ typedef enum {
MDBX_subpage_dupfixed_leaf
} MDBX_page_type_t;
#define MDBX_PGWALK_MAIN ((const char *)((ptrdiff_t)0))
#define MDBX_PGWALK_GC ((const char *)((ptrdiff_t)-1))
#define MDBX_PGWALK_META ((const char *)((ptrdiff_t)-2))
typedef int MDBX_pgvisitor_func(uint64_t pgno, unsigned number, void *ctx,
int deep, const char *dbi, size_t page_size,
MDBX_page_type_t type, size_t nentries,