Added an optional parameter to 'coroutine.isyieldable'
This commit is contained in:
@@ -146,7 +146,8 @@ static int luaB_costatus (lua_State *L) {
|
||||
|
||||
|
||||
static int luaB_yieldable (lua_State *L) {
|
||||
lua_pushboolean(L, lua_isyieldable(L));
|
||||
lua_State *co = lua_isnone(L, 1) ? L : getco(L);
|
||||
lua_pushboolean(L, lua_isyieldable(co));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user