diff options
Diffstat (limited to '')
-rw-r--r-- | ltests.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1367,7 +1367,7 @@ static int checkpanic (lua_State *L) { | |||
1367 | b.L = L; | 1367 | b.L = L; |
1368 | L1 = lua_newstate(f, ud, 0); /* create new state */ | 1368 | L1 = lua_newstate(f, ud, 0); /* create new state */ |
1369 | if (L1 == NULL) { /* error? */ | 1369 | if (L1 == NULL) { /* error? */ |
1370 | lua_pushnil(L); | 1370 | lua_pushstring(L, MEMERRMSG); |
1371 | return 1; | 1371 | return 1; |
1372 | } | 1372 | } |
1373 | lua_atpanic(L1, panicback); /* set its panic function */ | 1373 | lua_atpanic(L1, panicback); /* set its panic function */ |
@@ -1507,7 +1507,7 @@ static int getindex_aux (lua_State *L, lua_State *L1, const char **pc) { | |||
1507 | 1507 | ||
1508 | 1508 | ||
1509 | static const char *const statcodes[] = {"OK", "YIELD", "ERRRUN", | 1509 | static const char *const statcodes[] = {"OK", "YIELD", "ERRRUN", |
1510 | "ERRSYNTAX", MEMERRMSG, "ERRGCMM", "ERRERR"}; | 1510 | "ERRSYNTAX", MEMERRMSG, "ERRERR"}; |
1511 | 1511 | ||
1512 | /* | 1512 | /* |
1513 | ** Avoid these stat codes from being collected, to avoid possible | 1513 | ** Avoid these stat codes from being collected, to avoid possible |
@@ -1806,6 +1806,12 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { | |||
1806 | int level = getnum; | 1806 | int level = getnum; |
1807 | luaL_traceback(L1, L1, msg, level); | 1807 | luaL_traceback(L1, L1, msg, level); |
1808 | } | 1808 | } |
1809 | else if EQ("threadstatus") { | ||
1810 | lua_pushstring(L1, statcodes[lua_status(L1)]); | ||
1811 | } | ||
1812 | else if EQ("alloccount") { | ||
1813 | l_memcontrol.countlimit = cast_uint(getnum); | ||
1814 | } | ||
1809 | else if EQ("return") { | 1815 | else if EQ("return") { |
1810 | int n = getnum; | 1816 | int n = getnum; |
1811 | if (L1 != L) { | 1817 | if (L1 != L) { |