aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-09-09 15:16:28 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-09-09 15:16:28 -0300
commit2d2f955763c3ff7bee92ca52043ebf5fb23e72e0 (patch)
treea5b372c4d18e3dc6e8568a87bf887081fc917824
parent669f6306be9489dfff6973cbab868362c4892e77 (diff)
downloadlua-2d2f955763c3ff7bee92ca52043ebf5fb23e72e0.tar.gz
lua-2d2f955763c3ff7bee92ca52043ebf5fb23e72e0.tar.bz2
lua-2d2f955763c3ff7bee92ca52043ebf5fb23e72e0.zip
detail
-rw-r--r--ldo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ldo.c b/ldo.c
index 3f81b4ae..c0a1824f 100644
--- a/ldo.c
+++ b/ldo.c
@@ -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) {
416LUA_API int lua_resume (lua_State *L, int nargs) { 416LUA_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' */