Improved emscripten code based on comments

This commit is contained in:
Syrus
2019-07-07 17:10:13 -07:00
parent 9c96f01494
commit cb7a1f4486
2 changed files with 1 additions and 29 deletions

View File

@ -32,12 +32,7 @@ pub fn call_malloc(ctx: &mut Ctx, size: u32) -> u32 {
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(),
call_malloc(ctx, size),
)
}