fix(c-api) Fix a typo.

This commit is contained in:
Ivan Enderlin
2020-11-16 11:19:17 +01:00
parent 0eab5926af
commit ffad2d7bad

View File

@@ -68,10 +68,10 @@ pub unsafe extern "C" fn wasm_val_copy(
}
#[no_mangle]
pub unsafe extern "C" fn wasm_val_delete(val: Option<&wasm_val_t>) {
if let Some(v_inner) = val {
pub unsafe extern "C" fn wasm_val_delete(val: Option<Box<wasm_val_t>>) {
if let Some(val) = val {
// TODO: figure out where wasm_val is allocated first...
let _ = Box::from_raw(v_inner);
let _ = val;
}
}