MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / panicback

Function panicback

Dependencies/lua/src/ltests.c:1244–1253  ·  view source on GitHub ↗

** does a long-jump back to "main program". */

Source from the content-addressed store, hash-verified

1242** does a long-jump back to "main program".
1243*/
1244static int panicback (lua_State *L) {
1245 struct Aux *b;
1246 lua_checkstack(L, 1); /* open space for 'Aux' struct */
1247 lua_getfield(L, LUA_REGISTRYINDEX, "_jmpbuf"); /* get 'Aux' struct */
1248 b = (struct Aux *)lua_touserdata(L, -1);
1249 lua_pop(L, 1); /* remove 'Aux' struct */
1250 runC(b->L, L, b->paniccode); /* run optional panic code */
1251 longjmp(b->jb, 1);
1252 return 1; /* to avoid warnings */
1253}
1254
1255static int checkpanic (lua_State *L) {
1256 struct Aux b;

Callers

nothing calls this directly

Calls 4

lua_checkstackFunction · 0.85
lua_getfieldFunction · 0.85
lua_touserdataFunction · 0.85
runCFunction · 0.85

Tested by

no test coverage detected