From 35177611d20feee3b1d92c65159ec55e8e711d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Mon, 2 Dec 2024 22:12:17 +0300 Subject: [PATCH] =?UTF-8?q?mdbx:=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=BF=D1=80=D0=B8=20`MDBX=5FENABLE=5FDBI=5FSPARSE=3DO?= =?UTF-8?q?FF`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/dbi.c | 2 ++ src/dbi.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dbi.c b/src/dbi.c index 888f0e03..acadf0e5 100644 --- a/src/dbi.c +++ b/src/dbi.c @@ -3,6 +3,7 @@ #include "internals.h" +#if MDBX_ENABLE_DBI_SPARSE size_t dbi_bitmap_ctz_fallback(const MDBX_txn *txn, intptr_t bmi) { tASSERT(txn, bmi > 0); bmi &= -bmi; @@ -20,6 +21,7 @@ size_t dbi_bitmap_ctz_fallback(const MDBX_txn *txn, intptr_t bmi) { return debruijn_ctz32[(UINT32_C(0x077CB531) * (uint32_t)bmi) >> 27]; } } +#endif /* MDBX_ENABLE_DBI_SPARSE */ struct dbi_snap_result dbi_snap(const MDBX_env *env, const size_t dbi) { eASSERT(env, dbi < env->n_dbi); diff --git a/src/dbi.h b/src/dbi.h index 4c66c664..bfafe3e3 100644 --- a/src/dbi.h +++ b/src/dbi.h @@ -5,11 +5,11 @@ #include "essentials.h" +#if MDBX_ENABLE_DBI_SPARSE + MDBX_NOTHROW_CONST_FUNCTION MDBX_MAYBE_UNUSED MDBX_INTERNAL size_t dbi_bitmap_ctz_fallback(const MDBX_txn *txn, intptr_t bmi); -#if MDBX_ENABLE_DBI_SPARSE - static inline size_t dbi_bitmap_ctz(const MDBX_txn *txn, intptr_t bmi) { tASSERT(txn, bmi > 0); STATIC_ASSERT(sizeof(bmi) >= sizeof(txn->dbi_sparse[0]));