diff options
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 15 |
1 files changed, 1 insertions, 14 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.50 2008/10/30 15:39:30 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.51 2008/11/06 12:43:51 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -78,18 +78,6 @@ static void restore_stack_limit (lua_State *L) { | |||
78 | } | 78 | } |
79 | 79 | ||
80 | 80 | ||
81 | static void resetstack (lua_State *L, int status) { | ||
82 | L->ci = L->base_ci; | ||
83 | L->base = L->ci->base; | ||
84 | luaF_close(L, L->base); /* close possible pending closures */ | ||
85 | luaD_seterrorobj(L, status, L->base); | ||
86 | L->allowhook = 1; | ||
87 | restore_stack_limit(L); | ||
88 | L->errfunc = 0; | ||
89 | L->errorJmp = NULL; | ||
90 | } | ||
91 | |||
92 | |||
93 | void luaD_throw (lua_State *L, int errcode) { | 81 | void luaD_throw (lua_State *L, int errcode) { |
94 | if (L->errorJmp) { | 82 | if (L->errorJmp) { |
95 | L->errorJmp->status = errcode; | 83 | L->errorJmp->status = errcode; |
@@ -98,7 +86,6 @@ void luaD_throw (lua_State *L, int errcode) { | |||
98 | else { | 86 | else { |
99 | L->status = cast_byte(errcode); | 87 | L->status = cast_byte(errcode); |
100 | if (G(L)->panic) { | 88 | if (G(L)->panic) { |
101 | resetstack(L, errcode); | ||
102 | lua_unlock(L); | 89 | lua_unlock(L); |
103 | G(L)->panic(L); | 90 | G(L)->panic(L); |
104 | } | 91 | } |