luaD_inerror()

This commit is contained in:
Yevgen Muntyan 2011-01-23 12:27:13 -08:00
parent 3c96f3120c
commit 220fd8bcb9
2 changed files with 11 additions and 0 deletions

View File

@ -108,6 +108,15 @@ L_GNUC_NORETURN void luaD_throw (lua_State *L, int errcode) {
}
int luaD_inerror (lua_State *L)
{
if (L->errorJmp)
return L->errorJmp->status != 0;
else
return 0;
}
int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) {
struct lua_longjmp lj;
lj.status = 0;

View File

@ -53,5 +53,7 @@ LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud);
LUAI_FUNC void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop);
int luaD_inerror (lua_State *L);
#endif