wasmer/lib/emscripten/src/macros.rs
2019-02-05 10:35:15 -08:00

7 lines
212 B
Rust

macro_rules! emscripten_memory_pointer {
($memory:expr, $pointer:expr) => {{
use std::cell::Cell;
(&$memory.view::<u8>()[($pointer as usize)..]).as_ptr() as *mut Cell<u8> as *mut u8
}};
}