aboutsummaryrefslogtreecommitdiff
path: root/ltests.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 /ltests.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 'ltests.c')
-rw-r--r--ltests.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ltests.c b/ltests.c
index f1cb252d..07bde473 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.120 2011/06/24 14:36:21 roberto Exp roberto $ 2** $Id: ltests.c,v 2.121 2011/07/02 15:59:17 roberto Exp roberto $
3** Internal Module for Debugging of the Lua Implementation 3** Internal Module for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -1210,7 +1210,7 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) {
1210 } 1210 }
1211 else if EQ("resume") { 1211 else if EQ("resume") {
1212 int i = getindex; 1212 int i = getindex;
1213 status = lua_resume(lua_tothread(L1, i), getnum); 1213 status = lua_resume(lua_tothread(L1, i), L, getnum);
1214 } 1214 }
1215 else if EQ("pushstatus") { 1215 else if EQ("pushstatus") {
1216 pushcode(L1, status); 1216 pushcode(L1, status);
@@ -1397,7 +1397,7 @@ static int coresume (lua_State *L) {
1397 int status; 1397 int status;
1398 lua_State *co = lua_tothread(L, 1); 1398 lua_State *co = lua_tothread(L, 1);
1399 luaL_argcheck(L, co, 1, "coroutine expected"); 1399 luaL_argcheck(L, co, 1, "coroutine expected");
1400 status = lua_resume(co, 0); 1400 status = lua_resume(co, L, 0);
1401 if (status != LUA_OK && status != LUA_YIELD) { 1401 if (status != LUA_OK && status != LUA_YIELD) {
1402 lua_pushboolean(L, 0); 1402 lua_pushboolean(L, 0);
1403 lua_insert(L, -2); 1403 lua_insert(L, -2);