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) --- lcorolib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lcorolib.c') diff --git a/lcorolib.c b/lcorolib.c index 1eef89c9..78eb9e98 100644 --- a/lcorolib.c +++ b/lcorolib.c @@ -1,5 +1,5 @@ /* -** $Id: lcorolib.c,v 1.1 2010/06/10 21:30:26 roberto Exp roberto $ +** $Id: lcorolib.c,v 1.2 2010/07/02 11:38:13 roberto Exp roberto $ ** Coroutine Library ** See Copyright Notice in lua.h */ @@ -28,7 +28,7 @@ static int auxresume (lua_State *L, lua_State *co, int narg) { return -1; /* error flag */ } lua_xmove(L, co, narg); - status = lua_resume(co, narg); + status = lua_resume(co, L, narg); if (status == LUA_OK || status == LUA_YIELD) { int nres = lua_gettop(co); if (!lua_checkstack(L, nres + 1)) { -- cgit v1.2.3-55-g6feb