Expose some more internals publicly (#340)

This commit is contained in:
Jim Posen
2019-10-28 18:12:11 +01:00
committed by Sergei Pepyakin
parent f27e0ad53c
commit 71dd73d672
10 changed files with 30 additions and 173 deletions

View File

@@ -223,6 +223,16 @@ impl CompiledModule {
Box::new(()),
)
}
/// Return a reference-counting pointer to a module.
pub fn module(&self) -> Rc<Module> {
self.module.clone()
}
/// Return a reference to a module.
pub fn module_ref(&self) -> &Module {
&self.module
}
}
/// Similar to `DataInitializer`, but owns its own copy of the data rather