From b0a5e156b8e6913c6eb8ed65ab28576b8b88f461 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 14 Feb 2002 19:47:29 -0200 Subject: no more maximum stack size --- ltests.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index 0785fa7b..4c040392 100644 --- a/ltests.c +++ b/ltests.c @@ -378,9 +378,9 @@ static int udataval (lua_State *L) { static int doonnewstack (lua_State *L) { - lua_State *L1 = lua_newthread(L, luaL_check_int(L, 1)); - lua_dostring(L1, luaL_check_string(L, 2)); - lua_pushnumber(L, 1); + lua_State *L1 = lua_newthread(L); + int status = lua_dostring(L1, luaL_check_string(L, 1)); + lua_pushnumber(L, status); lua_closethread(L, L1); return 1; } @@ -399,7 +399,7 @@ static int d2s (lua_State *L) { static int newstate (lua_State *L) { - lua_State *L1 = lua_open(luaL_check_int(L, 1)); + lua_State *L1 = lua_open(); if (L1) { *cast(int **, L1) = &islocked; /* initialize the lock */ lua_pushnumber(L, (unsigned long)L1); -- cgit v1.2.3-55-g6feb