'nCcalls' should be local to each thread, as each thread may have its

own C stack (with LuaThreads or something similar)
This commit is contained in:
Roberto Ierusalimschy
2011-08-23 14:24:34 -03:00
parent 8a008a2057
commit 3dc5475e23
7 changed files with 31 additions and 31 deletions

View File

@@ -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)) {