aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lj_api.c5
-rw-r--r--src/lua.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/src/lj_api.c b/src/lj_api.c
index 3c1a07bc..c417af7e 100644
--- a/src/lj_api.c
+++ b/src/lj_api.c
@@ -1113,6 +1113,11 @@ LUALIB_API int luaL_callmeta(lua_State *L, int idx, const char *field)
1113 1113
1114/* -- Coroutine yield and resume ------------------------------------------ */ 1114/* -- Coroutine yield and resume ------------------------------------------ */
1115 1115
1116LUA_API int lua_isyieldable(lua_State *L)
1117{
1118 return cframe_canyield(L->cframe);
1119}
1120
1116LUA_API int lua_yield(lua_State *L, int nresults) 1121LUA_API int lua_yield(lua_State *L, int nresults)
1117{ 1122{
1118 void *cf = L->cframe; 1123 void *cf = L->cframe;
diff --git a/src/lua.h b/src/lua.h
index 0c653f56..615e0e36 100644
--- a/src/lua.h
+++ b/src/lua.h
@@ -351,6 +351,9 @@ LUA_API int lua_loadx (lua_State *L, lua_Reader reader, void *dt,
351LUA_API const lua_Number *lua_version (lua_State *L); 351LUA_API const lua_Number *lua_version (lua_State *L);
352LUA_API void lua_copy (lua_State *L, int fromidx, int toidx); 352LUA_API void lua_copy (lua_State *L, int fromidx, int toidx);
353 353
354/* From Lua 5.3. */
355LUA_API int lua_isyieldable (lua_State *L);
356
354 357
355struct lua_Debug { 358struct lua_Debug {
356 int event; 359 int event;