Skip to content

Commit

Permalink
rename to destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
xmclark committed Apr 4, 2019
1 parent 3b34ea6 commit 207bd01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/wasi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand All @@ -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! {
Expand Down

0 comments on commit 207bd01

Please sign in to comment.