Implemented wrenReturnBool in vm

This commit is contained in:
Harry Lawrence
2015-01-17 11:48:27 +00:00
parent ae97e9c3a4
commit dec4f0d1e7
2 changed files with 11 additions and 0 deletions
+8
View File
@@ -1236,3 +1236,11 @@ void wrenReturnString(WrenVM* vm, const char* text, int length)
*vm->foreignCallSlot = wrenNewString(vm, text, size);
vm->foreignCallSlot = NULL;
}
void wrenReturnBool(WrenVM* vm, bool value)
{
ASSERT(vm->foreignCallSlot != NULL, "Must be in foreign call.");
*vm->foreignCallSlot = BOOL_VAL(value);
vm->foreignCallSlot = NULL;
}