mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
chore(libmdbx): fix MDB_ -> MDBX_ typos (#22630)
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user