Changeset View
Changeset View
Standalone View
Standalone View
sys/contrib/openzfs/module/lua/ldo.c
Show First 20 Lines • Show All 190 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) { | int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) { | ||||
unsigned short oldnCcalls = L->nCcalls; | unsigned short oldnCcalls = L->nCcalls; | ||||
struct lua_longjmp lj; | struct lua_longjmp lj; | ||||
lj.status = LUA_OK; | lj.status = LUA_OK; | ||||
lj.previous = L->errorJmp; /* chain new error handler */ | lj.previous = L->errorJmp; /* chain new error handler */ | ||||
// cppcheck-suppress autoVariables | |||||
L->errorJmp = &lj; | L->errorJmp = &lj; | ||||
LUAI_TRY(L, &lj, | LUAI_TRY(L, &lj, | ||||
(*f)(L, ud); | (*f)(L, ud); | ||||
); | ); | ||||
L->errorJmp = lj.previous; /* restore old error handler */ | L->errorJmp = lj.previous; /* restore old error handler */ | ||||
L->nCcalls = oldnCcalls; | L->nCcalls = oldnCcalls; | ||||
return lj.status; | return lj.status; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 543 Lines • Show Last 20 Lines |