Formatted emscripten files

This commit is contained in:
Syrus
2019-07-06 17:46:48 -07:00
parent 15d1fd4bbb
commit d3d84cbc22
4 changed files with 36 additions and 15 deletions

View File

@ -22,11 +22,23 @@ use wasmer_runtime_core::{
};
pub fn call_malloc(ctx: &mut Ctx, size: u32) -> u32 {
get_emscripten_data(ctx).malloc.as_ref().unwrap().call(size).unwrap()
get_emscripten_data(ctx)
.malloc
.as_ref()
.unwrap()
.call(size)
.unwrap()
}
pub fn call_malloc_with_cast<T: Copy, Ty>(ctx: &mut Ctx, size: u32) -> WasmPtr<T, Ty> {
WasmPtr::new(get_emscripten_data(ctx).malloc.as_ref().unwrap().call(size).unwrap())
WasmPtr::new(
get_emscripten_data(ctx)
.malloc
.as_ref()
.unwrap()
.call(size)
.unwrap(),
)
}
pub fn call_memalign(ctx: &mut Ctx, alignment: u32, size: u32) -> u32 {