mirror of
https://gitflic.ru/project/erthink/libmdbx.git
synced 2025-01-08 09:17:06 +00:00
mdbx: исправление сборки при MDBX_ENABLE_DBI_SPARSE=OFF
.
This commit is contained in:
parent
99fa43f322
commit
35177611d2
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
|
|
||||||
|
#if MDBX_ENABLE_DBI_SPARSE
|
||||||
size_t dbi_bitmap_ctz_fallback(const MDBX_txn *txn, intptr_t bmi) {
|
size_t dbi_bitmap_ctz_fallback(const MDBX_txn *txn, intptr_t bmi) {
|
||||||
tASSERT(txn, bmi > 0);
|
tASSERT(txn, bmi > 0);
|
||||||
bmi &= -bmi;
|
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];
|
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) {
|
struct dbi_snap_result dbi_snap(const MDBX_env *env, const size_t dbi) {
|
||||||
eASSERT(env, dbi < env->n_dbi);
|
eASSERT(env, dbi < env->n_dbi);
|
||||||
|
@ -5,11 +5,11 @@
|
|||||||
|
|
||||||
#include "essentials.h"
|
#include "essentials.h"
|
||||||
|
|
||||||
|
#if MDBX_ENABLE_DBI_SPARSE
|
||||||
|
|
||||||
MDBX_NOTHROW_CONST_FUNCTION MDBX_MAYBE_UNUSED MDBX_INTERNAL size_t
|
MDBX_NOTHROW_CONST_FUNCTION MDBX_MAYBE_UNUSED MDBX_INTERNAL size_t
|
||||||
dbi_bitmap_ctz_fallback(const MDBX_txn *txn, intptr_t bmi);
|
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) {
|
static inline size_t dbi_bitmap_ctz(const MDBX_txn *txn, intptr_t bmi) {
|
||||||
tASSERT(txn, bmi > 0);
|
tASSERT(txn, bmi > 0);
|
||||||
STATIC_ASSERT(sizeof(bmi) >= sizeof(txn->dbi_sparse[0]));
|
STATIC_ASSERT(sizeof(bmi) >= sizeof(txn->dbi_sparse[0]));
|
||||||
|
Loading…
Reference in New Issue
Block a user