traceback stops at first protected call

This commit is contained in:
Roberto Ierusalimschy
2002-06-18 14:10:43 -03:00
parent 1dbe708aa8
commit 6ee2dbdfe9
5 changed files with 39 additions and 19 deletions

10
ldo.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: ldo.c,v 1.179 2002/06/03 20:12:50 roberto Exp roberto $
** $Id: ldo.c,v 1.180 2002/06/18 15:19:27 roberto Exp roberto $
** Stack and Call structure of Lua
** See Copyright Notice in lua.h
*/
@@ -501,5 +501,13 @@ int luaD_runprotected (lua_State *L, Pfunc f, TObject *ud) {
return lj.status;
}
int luaD_isprotected (lua_State *L, CallInfo *ci) {
struct lua_longjmp *l;
for (l = L->errorJmp; l; l = l->previous)
if (l->ci+1 == ci) return 1;
return 0;
}
/* }====================================================== */