MCPcopy Create free account
hub / github.com/Tencent/xLua / errorfunc

Function errorfunc

WebGLPlugins/xlua.c:647–655  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

645}
646
647LUA_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
657LUA_API int get_error_func_ref(lua_State *L) {
658 lua_pushcclosure(L, errorfunc, 0);

Callers

nothing calls this directly

Calls 5

lua_getfieldFunction · 0.85
lua_removeFunction · 0.85
lua_pushvalueFunction · 0.85
lua_pushnumberFunction · 0.85
lua_getglobalFunction · 0.70

Tested by

no test coverage detected