C API tweaks for wasmtime-py (#2029)
* wasmtime-c-api: Only drop non-null `*mut wasm_ref_t`s * wasmtime-c-api: Handle null refs in `wasm_val_t` to `Val` conversion * wasmtime-c-api: Don't unwrap and rewrap `Option`s The `unwrap` can panic, and there isn't any point to this unwrap+rewrap. * wasmtime-c-api: Add conversions between `funcref` and `wasm_func_t` * wasmtime-c-api: More ownership documentation for `wasmtime.h`
This commit is contained in:
@@ -91,7 +91,7 @@ pub extern "C" fn wasm_table_get(
|
||||
index: wasm_table_size_t,
|
||||
) -> Option<Box<wasm_ref_t>> {
|
||||
let val = t.table().get(index)?;
|
||||
Some(val_into_ref(val).unwrap())
|
||||
val_into_ref(val)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
||||
Reference in New Issue
Block a user