From 3dc5475e239e2da52a380288ae8b293a6b019f81 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 23 Aug 2011 14:24:34 -0300 Subject: 'nCcalls' should be local to each thread, as each thread may have its own C stack (with LuaThreads or something similar) --- ltests.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index f1cb252d..07bde473 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.120 2011/06/24 14:36:21 roberto Exp roberto $ +** $Id: ltests.c,v 2.121 2011/07/02 15:59:17 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -1210,7 +1210,7 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { } else if EQ("resume") { int i = getindex; - status = lua_resume(lua_tothread(L1, i), getnum); + status = lua_resume(lua_tothread(L1, i), L, getnum); } else if EQ("pushstatus") { pushcode(L1, status); @@ -1397,7 +1397,7 @@ static int coresume (lua_State *L) { int status; lua_State *co = lua_tothread(L, 1); luaL_argcheck(L, co, 1, "coroutine expected"); - status = lua_resume(co, 0); + status = lua_resume(co, L, 0); if (status != LUA_OK && status != LUA_YIELD) { lua_pushboolean(L, 0); lua_insert(L, -2); -- cgit v1.2.3-55-g6feb