aboutsummaryrefslogtreecommitdiff
path: root/src/lj_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_api.c')
-rw-r--r--src/lj_api.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lj_api.c b/src/lj_api.c
index 70834f8d..4942c1d6 100644
--- a/src/lj_api.c
+++ b/src/lj_api.c
@@ -1107,9 +1107,13 @@ LUA_API int lua_yield(lua_State *L, int nresults)
1107 top[2].fr.tp.ftsz = (int)((char *)(top+3)-(char *)L->base)+FRAME_CONT; 1107 top[2].fr.tp.ftsz = (int)((char *)(top+3)-(char *)L->base)+FRAME_CONT;
1108 L->top = L->base = top+3; 1108 L->top = L->base = top+3;
1109 } 1109 }
1110#if LJ_TARGET_X64
1111 lj_err_throw(L, LUA_YIELD);
1112#else
1110 L->cframe = NULL; 1113 L->cframe = NULL;
1111 L->status = LUA_YIELD; 1114 L->status = LUA_YIELD;
1112 lj_vm_unwind_c(cf, LUA_YIELD); 1115 lj_vm_unwind_c(cf, LUA_YIELD);
1116#endif
1113 } 1117 }
1114 lj_err_msg(L, LJ_ERR_CYIELD); 1118 lj_err_msg(L, LJ_ERR_CYIELD);
1115 return 0; /* unreachable */ 1119 return 0; /* unreachable */