'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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user