diff --git a/src/walk.c b/src/walk.c index 4a8c6e8c..4399c211 100644 --- a/src/walk.c +++ b/src/walk.c @@ -3,17 +3,6 @@ #include "internals.h" -typedef struct walk_ctx { - void *userctx; - walk_options_t options; - int deep; - walk_func *visitor; - MDBX_txn *txn; - MDBX_cursor *cursor; -} walk_ctx_t; - -__cold static int walk_tbl(walk_ctx_t *ctx, walk_tbl_t *tbl); - static page_type_t walk_page_type(const page_t *mp) { if (mp) switch (mp->flags & ~P_SPILLED) { @@ -251,7 +240,7 @@ __cold static int walk_pgno(walk_ctx_t *ctx, walk_tbl_t *tbl, const pgno_t pgno, return MDBX_SUCCESS; } -__cold static int walk_tbl(walk_ctx_t *ctx, walk_tbl_t *tbl) { +__cold int walk_tbl(walk_ctx_t *ctx, walk_tbl_t *tbl) { tree_t *const db = tbl->internal; if (unlikely(db->root == P_INVALID)) return MDBX_SUCCESS; /* empty db */ diff --git a/src/walk.h b/src/walk.h index c87b8479..0feee06d 100644 --- a/src/walk.h +++ b/src/walk.h @@ -18,3 +18,14 @@ typedef int walk_func(const size_t pgno, const unsigned number, void *const ctx, typedef enum walk_options { dont_check_keys_ordering = 1 } walk_options_t; MDBX_INTERNAL int walk_pages(MDBX_txn *txn, walk_func *visitor, void *user, walk_options_t options); + +typedef struct walk_ctx { + void *userctx; + walk_options_t options; + int deep; + walk_func *visitor; + MDBX_txn *txn; + MDBX_cursor *cursor; +} walk_ctx_t; + +MDBX_INTERNAL int walk_tbl(walk_ctx_t *ctx, walk_tbl_t *tbl);