change modules when updating code index (re: issue #27)

This commit is contained in:
Mark Thom
2018-04-20 14:03:04 -06:00
parent 09bd087ba5
commit b87d599b14
5 changed files with 59 additions and 39 deletions

View File

@@ -774,3 +774,12 @@ macro_rules! return_from_clause {
Ok(())
}}
}
macro_rules! set_code_index {
($idx:expr, $ip:expr, $mod_name:expr) => {{
let mut idx = $idx.0.borrow_mut();
idx.0 = $ip;
idx.1 = $mod_name.clone();
}}
}