aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ltests.c b/ltests.c
index 0a22f859..3571b537 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 1.136 2002/10/22 17:18:28 roberto Exp roberto $ 2** $Id: ltests.c,v 1.137 2002/10/22 18:07:55 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*/
@@ -403,7 +403,6 @@ static int doonnewstack (lua_State *L) {
403 if (status == 0) 403 if (status == 0)
404 status = lua_pcall(L1, 0, 0, 0); 404 status = lua_pcall(L1, 0, 0, 0);
405 lua_pushnumber(L, status); 405 lua_pushnumber(L, status);
406 lua_closethread(L, L1);
407 return 1; 406 return 1;
408} 407}
409 408
@@ -423,7 +422,7 @@ static int d2s (lua_State *L) {
423static int newstate (lua_State *L) { 422static int newstate (lua_State *L) {
424 lua_State *L1 = lua_open(); 423 lua_State *L1 = lua_open();
425 if (L1) { 424 if (L1) {
426 *cast(int **, L1) = &islocked; /* initialize the lock */ 425 lua_userstateopen(L1); /* init lock */
427 lua_pushnumber(L, (unsigned long)L1); 426 lua_pushnumber(L, (unsigned long)L1);
428 } 427 }
429 else 428 else
@@ -724,7 +723,7 @@ static void fim (void) {
724 723
725 724
726int luaB_opentests (lua_State *L) { 725int luaB_opentests (lua_State *L) {
727 *cast(int **, L) = &islocked; /* init lock */ 726 lua_userstateopen(L); /* init lock */
728 lua_state = L; /* keep first state to be opened */ 727 lua_state = L; /* keep first state to be opened */
729 luaL_opennamedlib(L, "T", tests_funcs, 0); 728 luaL_opennamedlib(L, "T", tests_funcs, 0);
730 atexit(fim); 729 atexit(fim);