| 158 | |
| 159 | |
| 160 | TStatus luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) { |
| 161 | l_uint32 oldnCcalls = L->nCcalls; |
| 162 | lua_longjmp lj; |
| 163 | lj.status = LUA_OK; |
| 164 | lj.previous = L->errorJmp; /* chain new error handler */ |
| 165 | L->errorJmp = &lj; |
| 166 | LUAI_TRY(L, &lj, f, ud); /* call 'f' catching errors */ |
| 167 | L->errorJmp = lj.previous; /* restore old error handler */ |
| 168 | L->nCcalls = oldnCcalls; |
| 169 | return lj.status; |
| 170 | } |
| 171 | |
| 172 | /* }====================================================== */ |
| 173 |
no test coverage detected