Test for dead coroutine moved to 'lua_resume'

The test for dead coroutines done in the 'coro' library was moved
to 'lua_resume', in the kernel, which already does other similar
tests.
This commit is contained in:
Roberto Ierusalimschy
2019-05-09 11:32:20 -03:00
parent 389116d8ab
commit 3f253f116e
2 changed files with 2 additions and 4 deletions

View File

@@ -35,10 +35,6 @@ static int auxresume (lua_State *L, lua_State *co, int narg) {
lua_pushliteral(L, "too many arguments to resume");
return -1; /* error flag */
}
if (lua_status(co) == LUA_OK && lua_gettop(co) == 0) {
lua_pushliteral(L, "cannot resume dead coroutine");
return -1; /* error flag */
}
lua_xmove(L, co, narg);
status = lua_resume(co, L, narg, &nres);
if (status == LUA_OK || status == LUA_YIELD) {