commit 2b579b4b83f7ebc527089fcb5f18b8531858609c
parent a1d0e1a11adf5fac8f30cc3cf1da6162174a5ce9
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Wed, 18 Feb 2009 11:51:39 -0300
panic mode does not reset stack (so that panic function can gather
debug information from it)
Diffstat:
M | ldo.c | | | 15 | +-------------- |
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/ldo.c b/ldo.c
@@ -1,5 +1,5 @@
/*
-** $Id: ldo.c,v 2.50 2008/10/30 15:39:30 roberto Exp roberto $
+** $Id: ldo.c,v 2.51 2008/11/06 12:43:51 roberto Exp roberto $
** Stack and Call structure of Lua
** See Copyright Notice in lua.h
*/
@@ -78,18 +78,6 @@ static void restore_stack_limit (lua_State *L) {
}
-static void resetstack (lua_State *L, int status) {
- L->ci = L->base_ci;
- L->base = L->ci->base;
- luaF_close(L, L->base); /* close possible pending closures */
- luaD_seterrorobj(L, status, L->base);
- L->allowhook = 1;
- restore_stack_limit(L);
- L->errfunc = 0;
- L->errorJmp = NULL;
-}
-
-
void luaD_throw (lua_State *L, int errcode) {
if (L->errorJmp) {
L->errorJmp->status = errcode;
@@ -98,7 +86,6 @@ void luaD_throw (lua_State *L, int errcode) {
else {
L->status = cast_byte(errcode);
if (G(L)->panic) {
- resetstack(L, errcode);
lua_unlock(L);
G(L)->panic(L);
}