mirror of
https://github.com/ValKmjolnir/Nasal-Interpreter.git
synced 2026-07-26 21:08:45 +08:00
update & bug fixed
This commit is contained in:
+11
@@ -286,6 +286,8 @@ int nasal_hash::get_value_address(std::string key)
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
std::cout<<">> [runtime] cannot find hash member \""<<key<<"\".\n";
|
||||
return ret_value_addr;
|
||||
}
|
||||
int nasal_hash::get_mem_address(std::string key)
|
||||
@@ -311,6 +313,15 @@ int nasal_hash::get_mem_address(std::string key)
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int mem_addr=nasal_vm.mem_alloc();
|
||||
int val_addr=nasal_vm.gc_alloc();
|
||||
nasal_vm.gc_get(val_addr).set_type(vm_nil);
|
||||
nasal_vm.mem_init(mem_addr,val_addr);
|
||||
elems[key]=mem_addr;
|
||||
ret_mem_addr=mem_addr;
|
||||
}
|
||||
return ret_mem_addr;
|
||||
}
|
||||
bool nasal_hash::check_contain(std::string key)
|
||||
|
||||
Reference in New Issue
Block a user