diff options
| -rw-r--r-- | ldo.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.c,v 2.31 2005/08/22 19:58:29 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.32 2005/08/24 16:15:49 roberto Exp roberto $ |
| 3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -416,7 +416,6 @@ static int resume_error (lua_State *L, const char *msg) { | |||
| 416 | LUA_API int lua_resume (lua_State *L, int nargs) { | 416 | LUA_API int lua_resume (lua_State *L, int nargs) { |
| 417 | int status; | 417 | int status; |
| 418 | lua_lock(L); | 418 | lua_lock(L); |
| 419 | lua_assert(L->errfunc == 0 && L->nCcalls == 0); | ||
| 420 | if (L->status != LUA_YIELD) { | 419 | if (L->status != LUA_YIELD) { |
| 421 | if (L->status != 0) | 420 | if (L->status != 0) |
| 422 | return resume_error(L, "cannot resume dead coroutine"); | 421 | return resume_error(L, "cannot resume dead coroutine"); |
| @@ -424,6 +423,7 @@ LUA_API int lua_resume (lua_State *L, int nargs) { | |||
| 424 | return resume_error(L, "cannot resume non-suspended coroutine"); | 423 | return resume_error(L, "cannot resume non-suspended coroutine"); |
| 425 | } | 424 | } |
| 426 | luai_userstateresume(L, nargs); | 425 | luai_userstateresume(L, nargs); |
| 426 | lua_assert(L->errfunc == 0 && L->nCcalls == 0); | ||
| 427 | status = luaD_rawrunprotected(L, resume, L->top - nargs); | 427 | status = luaD_rawrunprotected(L, resume, L->top - nargs); |
| 428 | if (status != 0) { /* error? */ | 428 | if (status != 0) { /* error? */ |
| 429 | L->status = cast(lu_byte, status); /* mark thread as `dead' */ | 429 | L->status = cast(lu_byte, status); /* mark thread as `dead' */ |
