fix: Mark all pointer manipulation as unsafe
See b43455fdd0468f067741a79a7031ba2fa907f0eb for rationale (cherry picked from commit b9996c6ddd3973cd419930210bf11a4d1bc6350b)
This commit is contained in:
parent
c986c09b8c
commit
d19dd45bbf
3 changed files with 43 additions and 19 deletions
|
|
@ -24,7 +24,10 @@ struct StoreRef {
|
|||
inner: NonNull<raw::Store>,
|
||||
}
|
||||
impl StoreRef {
|
||||
pub fn ptr(&self) -> *mut raw::Store {
|
||||
/// # Safety
|
||||
///
|
||||
/// The returned pointer is only valid as long as the `StoreRef` is alive.
|
||||
pub unsafe fn ptr(&self) -> *mut raw::Store {
|
||||
self.inner.as_ptr()
|
||||
}
|
||||
}
|
||||
|
|
@ -157,7 +160,10 @@ impl Store {
|
|||
Ok(store)
|
||||
}
|
||||
|
||||
pub fn raw_ptr(&self) -> *mut raw::Store {
|
||||
/// # Safety
|
||||
///
|
||||
/// The returned pointer is only valid as long as the `Store` is alive.
|
||||
pub unsafe fn raw_ptr(&self) -> *mut raw::Store {
|
||||
self.inner.ptr()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue