Instance now pulls state from the ImportObject

This commit is contained in:
Lachlan Sneff
2019-03-28 11:56:31 -07:00
parent e3a6b7c9d8
commit 7b0992e44f
4 changed files with 19 additions and 6 deletions

View File

@ -25,7 +25,7 @@ pub struct Ctx {
module: *const ModuleInner,
pub data: *mut c_void,
pub data_finalizer: Option<extern "C" fn(data: *mut c_void)>,
pub data_finalizer: Option<fn(data: *mut c_void)>,
}
/// The internal context of the currently running WebAssembly instance.
@ -100,7 +100,7 @@ impl Ctx {
import_backing: &mut ImportBacking,
module: &ModuleInner,
data: *mut c_void,
data_finalizer: extern "C" fn(*mut c_void),
data_finalizer: fn(*mut c_void),
) -> Self {
Self {
internal: InternalCtx {