aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-01-29 08:27:53 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-01-29 08:27:53 -0200
commit871166d7dbe987dafc074e5e55802202ec2a1963 (patch)
tree25bcc2c25364f385a74e1405e87960f1296e8fa5
parent592cf2334e90d36d6b4d0f284303cd13b0c1c852 (diff)
downloadlua-871166d7dbe987dafc074e5e55802202ec2a1963.tar.gz
lua-871166d7dbe987dafc074e5e55802202ec2a1963.tar.bz2
lua-871166d7dbe987dafc074e5e55802202ec2a1963.zip
test for panic function
-rw-r--r--ltests.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/ltests.c b/ltests.c
index 68944cf4..7c9cce4d 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 1.149 2002/12/19 11:11:55 roberto Exp roberto $ 2** $Id: ltests.c,v 1.150 2002/12/20 10:26:33 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*/
@@ -805,7 +805,15 @@ static void fim (void) {
805} 805}
806 806
807 807
808static int l_panic (lua_State *L) {
809 UNUSED(L);
810 fprintf(stderr, "unable to recover; exiting\n");
811 return 0;
812}
813
814
808int luaB_opentests (lua_State *L) { 815int luaB_opentests (lua_State *L) {
816 lua_atpanic(L, l_panic);
809 lua_userstateopen(L); /* init lock */ 817 lua_userstateopen(L); /* init lock */
810 lua_state = L; /* keep first state to be opened */ 818 lua_state = L; /* keep first state to be opened */
811 luaL_openlib(L, "T", tests_funcs, 0); 819 luaL_openlib(L, "T", tests_funcs, 0);