commit 522407e23ae02cdfcb221f1fea96c6c44aae0200
parent fa26d294aef136aa4ec48c23b4b87b853df0e3da
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Wed, 16 Jul 2003 17:51:25 -0300
we do not need a default panic (that does nothing anyway...)
Diffstat:
2 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/ldo.c b/ldo.c
@@ -1,5 +1,5 @@
/*
-** $Id: ldo.c,v 1.219 2003/05/14 21:02:39 roberto Exp roberto $
+** $Id: ldo.c,v 1.220 2003/07/16 20:49:02 roberto Exp roberto $
** Stack and Call structure of Lua
** See Copyright Notice in lua.h
*/
@@ -87,7 +87,7 @@ void luaD_throw (lua_State *L, int errcode) {
L_THROW(L->errorJmp);
}
else {
- G(L)->panic(L);
+ if (G(L)->panic) G(L)->panic(L);
exit(EXIT_FAILURE);
}
}
diff --git a/lstate.c b/lstate.c
@@ -1,5 +1,5 @@
/*
-** $Id: lstate.c,v 1.123 2003/04/03 13:35:34 roberto Exp $
+** $Id: lstate.c,v 1.124 2003/07/16 20:49:02 roberto Exp roberto $
** Global State
** See Copyright Notice in lua.h
*/
@@ -35,15 +35,6 @@ union UEXTRASPACE {L_Umaxalign a; LUA_USERSTATE b;};
-/*
-** you can change this function through the official API:
-** call `lua_setpanicf'
-*/
-static int default_panic (lua_State *L) {
- UNUSED(L);
- return 0;
-}
-
static lua_State *mallocstate (lua_State *L) {
lu_byte *block = (lu_byte *)luaM_malloc(L, sizeof(lua_State) + EXTRASPACE);
@@ -99,7 +90,7 @@ static void f_luaopen (lua_State *L, void *ud) {
setnilvalue(defaultmeta(L));
setnilvalue(registry(L));
luaZ_initbuffer(L, &g->buff);
- g->panic = default_panic;
+ g->panic = NULL;
g->rootgc = NULL;
g->rootudata = NULL;
g->tmudata = NULL;