From 3f253f116e8e292977a1bded964544fb35b3d1e3 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 9 May 2019 11:32:20 -0300 Subject: 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. --- lcorolib.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lcorolib.c') diff --git a/lcorolib.c b/lcorolib.c index a21880d5..3fc9fb1c 100644 --- a/lcorolib.c +++ b/lcorolib.c @@ -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) { -- cgit v1.2.3-55-g6feb