interpret: rename Pointer::from_addr → from_addr_invalid

This commit is contained in:
Ralf Jung 2023-02-14 14:55:50 +01:00
parent 2d91939bb7
commit 91d25168cd
5 changed files with 8 additions and 6 deletions

View file

@ -251,14 +251,16 @@ impl<Prov> Pointer<Option<Prov>> {
}
impl<Prov> Pointer<Option<Prov>> {
/// Creates a pointer to the given address, with invalid provenance (i.e., cannot be used for
/// any memory access).
#[inline(always)]
pub fn from_addr(addr: u64) -> Self {
pub fn from_addr_invalid(addr: u64) -> Self {
Pointer { provenance: None, offset: Size::from_bytes(addr) }
}
#[inline(always)]
pub fn null() -> Self {
Pointer::from_addr(0)
Pointer::from_addr_invalid(0)
}
}