| 424 | |
| 425 | |
| 426 | static int db_traceback (lua_State *L) { |
| 427 | int arg; |
| 428 | lua_State *L1 = getthread(L, &arg); |
| 429 | const char *msg = lua_tostring(L, arg + 1); |
| 430 | if (msg == NULL && !lua_isnoneornil(L, arg + 1)) /* non-string 'msg'? */ |
| 431 | lua_pushvalue(L, arg + 1); /* return it untouched */ |
| 432 | else { |
| 433 | int level = (int)luaL_optinteger(L, arg + 2, (L == L1) ? 1 : 0); |
| 434 | luaL_traceback(L, L1, msg, level); |
| 435 | } |
| 436 | return 1; |
| 437 | } |
| 438 | |
| 439 | |
| 440 | static int db_setcstacklimit (lua_State *L) { |
nothing calls this directly
no test coverage detected