chore(libmdbx): fix MDB_ -> MDBX_ typos (#22630)

Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Derek Cofausper
2026-02-26 22:06:07 -08:00
committed by GitHub
parent f88538e033
commit 7a78044587
3 changed files with 8 additions and 8 deletions

View File

@@ -161,7 +161,7 @@ impl Environment {
mdbx_result(ffi::mdbx_env_stat_ex(
self.env_ptr(),
ptr::null(),
stat.mdb_stat(),
stat.mdbx_stat(),
size_of::<Stat>(),
))?;
Ok(stat)
@@ -305,13 +305,13 @@ unsafe impl Sync for EnvPtr {}
pub struct Stat(ffi::MDBX_stat);
impl Stat {
/// Create a new Stat with zero'd inner struct `ffi::MDB_stat`.
/// Create a new Stat with zero'd inner struct `ffi::MDBX_stat`.
pub(crate) const fn new() -> Self {
unsafe { Self(mem::zeroed()) }
}
/// Returns a mut pointer to `ffi::MDB_stat`.
pub(crate) const fn mdb_stat(&mut self) -> *mut ffi::MDBX_stat {
/// Returns a mut pointer to `ffi::MDBX_stat`.
pub(crate) const fn mdbx_stat(&mut self) -> *mut ffi::MDBX_stat {
&mut self.0
}
}

View File

@@ -177,7 +177,7 @@ where
self.env().txn_manager().remove_active_read_transaction(txn);
let mut latency = CommitLatency::new();
mdbx_result(unsafe { ffi::mdbx_txn_commit_ex(txn, latency.mdb_commit_latency()) })
mdbx_result(unsafe { ffi::mdbx_txn_commit_ex(txn, latency.mdbx_commit_latency()) })
.map(|v| (v, latency))
} else {
let (sender, rx) = sync_channel(0);
@@ -246,7 +246,7 @@ where
unsafe {
let mut stat = Stat::new();
self.txn_execute(|txn| {
mdbx_result(ffi::mdbx_dbi_stat(txn, dbi, stat.mdb_stat(), size_of::<Stat>()))
mdbx_result(ffi::mdbx_dbi_stat(txn, dbi, stat.mdbx_stat(), size_of::<Stat>()))
})??;
Ok(stat)
}
@@ -647,7 +647,7 @@ impl CommitLatency {
}
/// Returns a mut pointer to `ffi::MDBX_commit_latency`.
pub(crate) const fn mdb_commit_latency(&mut self) -> *mut ffi::MDBX_commit_latency {
pub(crate) const fn mdbx_commit_latency(&mut self) -> *mut ffi::MDBX_commit_latency {
&mut self.0
}
}

View File

@@ -100,7 +100,7 @@ impl TxnManager {
.send({
let mut latency = CommitLatency::new();
mdbx_result(unsafe {
ffi::mdbx_txn_commit_ex(tx.0, latency.mdb_commit_latency())
ffi::mdbx_txn_commit_ex(tx.0, latency.mdbx_commit_latency())
})
.map(|v| (v, latency))
})