MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / precover

Function precover

lib/lua/src/ldo.c:824–832  ·  view source on GitHub ↗

** Unrolls a coroutine in protected mode while there are recoverable ** errors, that is, errors inside a protected call. (Any error ** interrupts 'unroll', and this loop protects it again so it can ** continue.) Stops with a normal end (status == LUA_OK), an yield ** (status == LUA_YIELD), or an unprotected error ('findpcall' doesn't ** find a recover point). */

Source from the content-addressed store, hash-verified

822** find a recover point).
823*/
824static int precover (lua_State *L, int status) {
825 CallInfo *ci;
826 while (errorstatus(status) && (ci = findpcall(L)) != NULL) {
827 L->ci = ci; /* go down to recovery functions */
828 setcistrecst(ci, status); /* status to finish 'pcall' */
829 status = luaD_rawrunprotected(L, unroll, NULL);
830 }
831 return status;
832}
833
834
835LUA_API int lua_resume (lua_State *L, lua_State *from, int nargs,

Callers 1

lua_resumeFunction · 0.85

Calls 2

findpcallFunction · 0.85
luaD_rawrunprotectedFunction · 0.85

Tested by

no test coverage detected