From aeae465b9ecaa24b4a7bd00294a26aedc9750ea9 Mon Sep 17 00:00:00 2001 From: NikVolf Date: Wed, 26 Apr 2017 22:59:31 +0300 Subject: [PATCH] add mutable refs --- src/elements/global_entry.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/elements/global_entry.rs b/src/elements/global_entry.rs index 9fb23bb..9a79f4d 100644 --- a/src/elements/global_entry.rs +++ b/src/elements/global_entry.rs @@ -12,6 +12,10 @@ impl GlobalEntry { pub fn global_type(&self) -> &GlobalType { &self.global_type } /// Initialization expression (opcodes) for global. 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 {