Allow getting variables by handle

This commit is contained in:
King_DuckZ 2020-04-28 15:15:53 +02:00
commit b5bf777a05
2 changed files with 20 additions and 16 deletions

View file

@ -187,6 +187,14 @@ namespace wren {
wrenGetVariable(m_local->wvm, module, name, slot);
}
void VM::variable(const ModuleAndName& mod_and_name, int slot) {
this->variable(std::get<0>(mod_and_name), std::get<1>(mod_and_name), slot);
}
void VM::variable (const Handle& handle, int slot) {
wrenSetSlotHandle(m_local->wvm, slot, handle);
}
template bool VM::slot<bool>(int);
template std::string VM::slot<std::string>(int);
template double VM::slot<double>(int);