aboutsummaryrefslogtreecommitdiff
path: root/lcorolib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-08-23 14:24:34 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-08-23 14:24:34 -0300
commit3dc5475e239e2da52a380288ae8b293a6b019f81 (patch)
tree3da13bd67407f9717b5fb9a024dca38b78589bfc /lcorolib.c
parent8a008a20579dd6818cb770147c8765b72eb2acfe (diff)
downloadlua-3dc5475e239e2da52a380288ae8b293a6b019f81.tar.gz
lua-3dc5475e239e2da52a380288ae8b293a6b019f81.tar.bz2
lua-3dc5475e239e2da52a380288ae8b293a6b019f81.zip
'nCcalls' should be local to each thread, as each thread may have its
own C stack (with LuaThreads or something similar)
Diffstat (limited to 'lcorolib.c')
-rw-r--r--lcorolib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lcorolib.c b/lcorolib.c
index 1eef89c9..78eb9e98 100644
--- a/lcorolib.c
+++ b/lcorolib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lcorolib.c,v 1.1 2010/06/10 21:30:26 roberto Exp roberto $ 2** $Id: lcorolib.c,v 1.2 2010/07/02 11:38:13 roberto Exp roberto $
3** Coroutine Library 3** Coroutine Library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -28,7 +28,7 @@ static int auxresume (lua_State *L, lua_State *co, int narg) {
28 return -1; /* error flag */ 28 return -1; /* error flag */
29 } 29 }
30 lua_xmove(L, co, narg); 30 lua_xmove(L, co, narg);
31 status = lua_resume(co, narg); 31 status = lua_resume(co, L, narg);
32 if (status == LUA_OK || status == LUA_YIELD) { 32 if (status == LUA_OK || status == LUA_YIELD) {
33 int nres = lua_gettop(co); 33 int nres = lua_gettop(co);
34 if (!lua_checkstack(L, nres + 1)) { 34 if (!lua_checkstack(L, nres + 1)) {