add mutable refs

This commit is contained in:
NikVolf 2017-04-26 22:59:31 +03:00
parent c52ccb7cd3
commit aeae465b9e

View File

@ -12,6 +12,10 @@ impl GlobalEntry {
pub fn global_type(&self) -> &GlobalType { &self.global_type } pub fn global_type(&self) -> &GlobalType { &self.global_type }
/// Initialization expression (opcodes) for global. /// Initialization expression (opcodes) for global.
pub fn init_expr(&self) -> &InitExpr { &self.init_expr } pub fn init_expr(&self) -> &InitExpr { &self.init_expr }
/// Global type (mutable)
pub fn global_type_mut(&mut self) -> &mut GlobalType { &mut self.global_type }
/// Initialization expression (opcodes) for global (mutable)
pub fn init_expr_mut(&mut self) -> &mut InitExpr { &mut self.init_expr }
} }
impl Deserialize for GlobalEntry { impl Deserialize for GlobalEntry {