aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2008-08-13 14:02:12 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2008-08-13 14:02:12 -0300
commitc1565c16edc487f32d87d1742a7c8e76d0b10236 (patch)
tree31ca4a4f361ca2a5fceb9ff5a2b4b570c57f2bc0 /ltests.c
parent394646891cc406ce2a0f1586409c043c9caeab4e (diff)
downloadlua-c1565c16edc487f32d87d1742a7c8e76d0b10236.tar.gz
lua-c1565c16edc487f32d87d1742a7c8e76d0b10236.tar.bz2
lua-c1565c16edc487f32d87d1742a7c8e76d0b10236.zip
small bug: lua_resume returning LUA_YIELD is not an error
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ltests.c b/ltests.c
index a7882ed9..9d58ed2d 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.52 2008/06/23 16:50:34 roberto Exp roberto $ 2** $Id: ltests.c,v 2.53 2008/06/26 19:42:45 roberto Exp roberto $
3** Internal Module for Debugging of the Lua Implementation 3** Internal Module for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -1072,7 +1072,7 @@ static int coresume (lua_State *L) {
1072 lua_State *co = lua_tothread(L, 1); 1072 lua_State *co = lua_tothread(L, 1);
1073 luaL_argcheck(L, co, 1, "coroutine expected"); 1073 luaL_argcheck(L, co, 1, "coroutine expected");
1074 status = lua_resume(co, 0); 1074 status = lua_resume(co, 0);
1075 if (status != 0) { 1075 if (status != LUA_OK && status != LUA_YIELD) {
1076 lua_pushboolean(L, 0); 1076 lua_pushboolean(L, 0);
1077 lua_insert(L, -2); 1077 lua_insert(L, -2);
1078 return 2; /* return false + error message */ 1078 return 2; /* return false + error message */