rename to destructor

This commit is contained in:
Mackenzie Clark
2019-04-03 17:13:50 -07:00
parent 3b34ea6211
commit 207bd01400

View File

@ -19,7 +19,7 @@ use wasmer_runtime_core::{func, import::ImportObject, imports};
pub fn generate_import_object(args: Vec<Vec<u8>>, envs: Vec<Vec<u8>>) -> ImportObject {
let state_gen = move || {
fn state_dtor(data: *mut c_void) {
fn state_destructor(data: *mut c_void) {
unsafe {
drop(Box::from_raw(data as *mut WasiState));
}
@ -33,7 +33,7 @@ pub fn generate_import_object(args: Vec<Vec<u8>>, envs: Vec<Vec<u8>>) -> ImportO
(
Box::leak(state) as *mut WasiState as *mut c_void,
state_dtor as fn(*mut c_void),
state_destructor as fn(*mut c_void),
)
};
imports! {