MCPcopy Create free account
hub / github.com/DFHack/dfhack / db_traceback

Function db_traceback

depends/lua/src/ldblib.c:417–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415
416
417static int db_traceback (lua_State *L) {
418 int arg;
419 lua_State *L1 = getthread(L, &arg);
420 const char *msg = lua_tostring(L, arg + 1);
421 if (msg == NULL && !lua_isnoneornil(L, arg + 1)) /* non-string 'msg'? */
422 lua_pushvalue(L, arg + 1); /* return it untouched */
423 else {
424 int level = (int)luaL_optinteger(L, arg + 2, (L == L1) ? 1 : 0);
425 luaL_traceback(L, L1, msg, level);
426 }
427 return 1;
428}
429
430
431static const luaL_Reg dblib[] = {

Callers

nothing calls this directly

Calls 4

getthreadFunction · 0.85
lua_pushvalueFunction · 0.85
luaL_optintegerFunction · 0.85
luaL_tracebackFunction · 0.85

Tested by

no test coverage detected