MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaD_rawrunprotected

Function luaD_rawrunprotected

src/Chain/libraries/glua/ldo.cpp:164–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162
163
164int luaD_rawrunprotected(lua_State *L, Pfunc f, void *ud) {
165 unsigned short oldnCcalls = L->nCcalls;
166 struct lua_longjmp lj;
167 lj.status = LUA_OK;
168 lj.previous = L->errorJmp; /* chain new error handler */
169 L->errorJmp = &lj;
170 LUAI_TRY(L, &lj,
171 (*f)(L, ud);
172 );
173 L->errorJmp = lj.previous; /* restore old error handler */
174 L->nCcalls = oldnCcalls;
175 // TODO: 如果有错误,考虑在这里加进来,通知lua_State有错误
176 return lj.status;
177}
178
179/* }====================================================== */
180

Callers 4

lua_resumeFunction · 0.85
luaD_pcallFunction · 0.85
lua_newstateFunction · 0.85
lua_checkstackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected