This commit is contained in:
Bob Nystrom
2015-01-18 10:20:29 -08:00
3 changed files with 15 additions and 1 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;
}