Fix local table ownership issue

This commit is contained in:
Mark McCaskey
2020-10-14 16:12:35 -07:00
parent 4fc8ace118
commit 49fe1734b3
10 changed files with 160 additions and 124 deletions

View File

@@ -43,7 +43,7 @@ impl Table {
let tunables = store.tunables();
let style = tunables.table_style(&ty);
let table = tunables
.create_table(&ty, &style)
.create_table(&ty, &style, None)
.map_err(RuntimeError::new)?;
let num_elements = table.size();
@@ -97,9 +97,7 @@ impl Table {
let item = init.into_checked_anyfunc(&self.store)?;
match self.table.grow(delta) {
Some(len) => {
dbg!("In Some result of table.grow");
for i in 0..delta {
dbg!("setting element", i);
set_table_item(self.table.as_ref(), len + i, item.clone())?;
}
Ok(len)