mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-07 05:08:19 +00:00
fix(c-api) Remove done TODO.
This commit is contained in:
@@ -60,7 +60,6 @@ pub unsafe extern "C" fn wasm_instance_delete(_instance: Option<Box<wasm_instanc
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn wasm_instance_exports(
|
||||
instance: &wasm_instance_t,
|
||||
// TODO: review types on wasm_declare_vec, handle the optional pointer part properly
|
||||
out: &mut wasm_extern_vec_t,
|
||||
) {
|
||||
let instance = &instance.inner;
|
||||
@@ -73,6 +72,7 @@ pub unsafe extern "C" fn wasm_instance_exports(
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
Box::into_raw(Box::new(wasm_extern_t {
|
||||
instance: Some(Arc::clone(instance)),
|
||||
inner: r#extern.clone(),
|
||||
@@ -83,6 +83,6 @@ pub unsafe extern "C" fn wasm_instance_exports(
|
||||
|
||||
out.size = extern_vec.len();
|
||||
out.data = extern_vec.as_mut_ptr();
|
||||
// TODO: double check that the destructor will work correctly here
|
||||
|
||||
mem::forget(extern_vec);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user