| 123 | |
| 124 | |
| 125 | int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) { |
| 126 | unsigned short oldnCcalls = L->nCcalls; |
| 127 | struct lua_longjmp lj; |
| 128 | lj.status = LUA_OK; |
| 129 | lj.previous = L->errorJmp; /* chain new error handler */ |
| 130 | L->errorJmp = &lj; |
| 131 | LUAI_TRY(L, &lj, |
| 132 | (*f)(L, ud); |
| 133 | ); |
| 134 | L->errorJmp = lj.previous; /* restore old error handler */ |
| 135 | L->nCcalls = oldnCcalls; |
| 136 | return lj.status; |
| 137 | } |
| 138 | |
| 139 | /* }====================================================== */ |
| 140 |
no test coverage detected