| 645 | } |
| 646 | |
| 647 | LUA_API int errorfunc(lua_State *L) { |
| 648 | lua_getglobal(L, "debug"); |
| 649 | lua_getfield(L, -1, "traceback"); |
| 650 | lua_remove(L, -2); |
| 651 | lua_pushvalue(L, 1); |
| 652 | lua_pushnumber(L, 2); |
| 653 | lua_call(L, 2, 1); |
| 654 | return 1; |
| 655 | } |
| 656 | |
| 657 | LUA_API int get_error_func_ref(lua_State *L) { |
| 658 | lua_pushcclosure(L, errorfunc, 0); |
nothing calls this directly
no test coverage detected