diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-08-23 14:24:34 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-08-23 14:24:34 -0300 |
commit | 3dc5475e239e2da52a380288ae8b293a6b019f81 (patch) | |
tree | 3da13bd67407f9717b5fb9a024dca38b78589bfc /ltests.c | |
parent | 8a008a20579dd6818cb770147c8765b72eb2acfe (diff) | |
download | lua-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |