Skip to content

Commit

Permalink
Merge pull request wasmerio#4444 from chipshort/fix-wasm-ref-docs
Browse files Browse the repository at this point in the history
Fix note about unaligned references in `WasmRef` docs
  • Loading branch information
syrusakbary authored Feb 7, 2024
2 parents bcebad4 + ebfd642 commit 323d7de
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/api/src/mem_access.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ impl From<FromUtf8Error> for MemoryAccessError {
/// trait which guarantees that reading and writing such a value to untrusted
/// memory is safe.
///
/// The address is not required to be aligned: unaligned accesses are fully
/// supported.
/// The address is required to be aligned: unaligned accesses cause undefined behavior.
///
/// This wrapper safely handles concurrent modifications of the data by another
/// thread.
Expand Down Expand Up @@ -86,7 +85,7 @@ impl<'a, T: ValueType> WasmRef<'a, T> {
WasmPtr::new(self.offset)
}

/// Get a `WasmPtr` fror this `WasmRef`.
/// Get a `WasmPtr` for this `WasmRef`.
#[inline]
pub fn as_ptr<M: MemorySize>(self) -> WasmPtr<T, M> {
let offset: M::Offset = self
Expand Down

0 comments on commit 323d7de

Please sign in to comment.