aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldo.c')
-rw-r--r--ldo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ldo.c b/ldo.c
index 45abf3da..cc564ca0 100644
--- a/ldo.c
+++ b/ldo.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldo.c,v 2.110 2013/08/27 18:53:35 roberto Exp roberto $ 2** $Id: ldo.c,v 2.111 2013/09/17 15:40:06 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*/
@@ -538,6 +538,7 @@ static void resume (lua_State *L, void *ud) {
538 538
539LUA_API int lua_resume (lua_State *L, lua_State *from, int nargs) { 539LUA_API int lua_resume (lua_State *L, lua_State *from, int nargs) {
540 int status; 540 int status;
541 int oldnny = L->nny; /* save 'nny' */
541 lua_lock(L); 542 lua_lock(L);
542 luai_userstateresume(L, nargs); 543 luai_userstateresume(L, nargs);
543 L->nCcalls = (from) ? from->nCcalls + 1 : 1; 544 L->nCcalls = (from) ? from->nCcalls + 1 : 1;
@@ -559,7 +560,7 @@ LUA_API int lua_resume (lua_State *L, lua_State *from, int nargs) {
559 } 560 }
560 lua_assert(status == L->status); 561 lua_assert(status == L->status);
561 } 562 }
562 L->nny = 1; /* do not allow yields */ 563 L->nny = oldnny; /* restore 'nny' */
563 L->nCcalls--; 564 L->nCcalls--;
564 lua_assert(L->nCcalls == ((from) ? from->nCcalls : 0)); 565 lua_assert(L->nCcalls == ((from) ? from->nCcalls : 0));
565 lua_unlock(L); 566 lua_unlock(L);