Add instance.ctx() to make inner private again

This commit is contained in:
Brandon Fish
2019-01-23 22:27:33 -06:00
parent 6a5386e313
commit 8266386119
2 changed files with 9 additions and 5 deletions

View File

@ -25,8 +25,8 @@ pub struct InstanceInner {
/// A WebAssembly instance
pub struct Instance {
pub module: Rc<ModuleInner>,
pub inner: Box<InstanceInner>,
module: Rc<ModuleInner>,
inner: Box<InstanceInner>,
#[allow(dead_code)]
imports: Box<ImportObject>,
}
@ -100,6 +100,10 @@ impl Instance {
pub fn module(&self) -> Module {
Module::new(Rc::clone(&self.module))
}
pub fn ctx(&mut self) -> &mut vm::Ctx {
&mut self.inner.vmctx
}
}
impl Instance {