eris: add 'lua_isthrowing' support
This commit is contained in:
@@ -102,6 +102,9 @@ static void seterrorobj (lua_State *L, int errcode, StkId oldtop) {
|
||||
L->top = oldtop + 1;
|
||||
}
|
||||
|
||||
LUA_API int lua_isthrowing (lua_State *L) {
|
||||
return ((L->errorJmp != NULL) && (L->errorJmp->status != LUA_OK));
|
||||
}
|
||||
|
||||
l_noret luaD_throw (lua_State *L, int errcode) {
|
||||
if (L->errorJmp) { /* thread has an error handler? */
|
||||
|
||||
@@ -150,6 +150,7 @@ LUA_API void (lua_insert) (lua_State *L, int idx);
|
||||
LUA_API void (lua_replace) (lua_State *L, int idx);
|
||||
LUA_API void (lua_copy) (lua_State *L, int fromidx, int toidx);
|
||||
LUA_API int (lua_checkstack) (lua_State *L, int sz);
|
||||
LUA_API int (lua_isthrowing) (lua_State *L);
|
||||
|
||||
LUA_API void (lua_xmove) (lua_State *from, lua_State *to, int n);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user