Add Handle class.
This commit is contained in:
parent
67a5fab3c4
commit
79f59f5d36
5 changed files with 49 additions and 0 deletions
|
@ -164,6 +164,11 @@ namespace wren {
|
|||
return interpret(module_name.c_str(), script.c_str());
|
||||
}
|
||||
|
||||
void VM::release (Handle& handle) noexcept {
|
||||
if (handle)
|
||||
wrenReleaseHandle(m_local->wvm, handle);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T VM::slot (int slot_num) {
|
||||
return slot_specialized<T>(m_local->wvm, slot_num);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue