Browse Source

wasmtime-c-api: Make `wasmtime_externref_new` proxy to `wasmtime_externref_new_with_finalizer`

pull/1996/head
Nick Fitzgerald 4 years ago
parent
commit
742f8ee1fc
  1. 5
      crates/c-api/src/ref.rs

5
crates/c-api/src/ref.rs

@ -113,10 +113,7 @@ impl Drop for CExternRef {
#[no_mangle] #[no_mangle]
pub extern "C" fn wasmtime_externref_new(data: *mut c_void) -> wasm_val_t { pub extern "C" fn wasmtime_externref_new(data: *mut c_void) -> wasm_val_t {
wasm_val_t::from_val(Val::ExternRef(Some(ExternRef::new(CExternRef { wasmtime_externref_new_with_finalizer(data, None)
data,
finalizer: None,
}))))
} }
#[no_mangle] #[no_mangle]

Loading…
Cancel
Save