Skip to content

Commit 50beb21

Browse files
alexcrichtonsunfishcode
authored andcommitted
Add a missing api to the wasm C API (#433)
This was used when [prototyping] but I found it wasn't implemented yet! [prototyping]: dtolnay/watt#2 (comment)
1 parent 842faf5 commit 50beb21

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

wasmtime-api/src/wasm.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,11 @@ pub unsafe extern "C" fn wasm_valtype_new(kind: wasm_valkind_t) -> *mut wasm_val
858858
Box::into_raw(ty)
859859
}
860860

861+
#[no_mangle]
862+
pub unsafe extern "C" fn wasm_valtype_delete(vt: *mut wasm_valtype_t) {
863+
drop(Box::from_raw(vt));
864+
}
865+
861866
#[no_mangle]
862867
pub unsafe extern "C" fn wasm_byte_vec_new(
863868
out: *mut wasm_byte_vec_t,

0 commit comments

Comments
 (0)