Add wrenAbortFiber().
Thanks, @underscorediscovery!
This commit is contained in:
+1
-1
@@ -513,7 +513,7 @@ typedef struct
|
||||
// S[NaN ]1---------------------------------------------------
|
||||
//
|
||||
// For singleton values, we just enumerate the different values. We'll use the
|
||||
// low three bits of the mantissa for that, and only need a couple:
|
||||
// low bits of the mantissa for that, and only need a few:
|
||||
//
|
||||
// 3 Type bits--v
|
||||
// 0[NaN ]1------------------------------------------------[T]
|
||||
|
||||
@@ -927,6 +927,7 @@ static WrenInterpretResult runInterpreter(WrenVM* vm, register ObjFiber* fiber)
|
||||
|
||||
case METHOD_FOREIGN:
|
||||
callForeign(vm, fiber, method->fn.foreign, numArgs);
|
||||
if (!IS_NULL(fiber->error)) RUNTIME_ERROR();
|
||||
break;
|
||||
|
||||
case METHOD_FN_CALL:
|
||||
@@ -1660,3 +1661,9 @@ void wrenGetVariable(WrenVM* vm, const char* module, const char* name,
|
||||
|
||||
setSlot(vm, slot, moduleObj->variables.data[variableSlot]);
|
||||
}
|
||||
|
||||
void wrenAbortFiber(WrenVM* vm, int slot)
|
||||
{
|
||||
validateApiSlot(vm, slot);
|
||||
vm->fiber->error = vm->apiStack[slot];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user