allow coroutine.corunning to return the main thread

http://lua-users.org/lists/lua-l/2006-09/msg00751.html
This commit is contained in:
Glenn Maynard
2006-10-15 21:01:34 +00:00
parent 84dc84627b
commit 260ce8a472
+2 -4
View File
@@ -585,10 +585,8 @@ static int luaB_costatus (lua_State *L) {
static int luaB_corunning (lua_State *L) {
if (lua_pushthread(L))
return 0; /* main thread is not a coroutine */
else
return 1;
lua_pushthread(L);
return 1;
}