MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / compat53_pushfuncname

Function compat53_pushfuncname

extlibs/sol3/include/sol/sol.hpp:2739–2754  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2737}
2738
2739static void compat53_pushfuncname(lua_State *L, lua_Debug *ar) {
2740 if (*ar->namewhat != '\0') /* is there a name? */
2741 lua_pushfstring(L, "function " LUA_QS, ar->name);
2742 else if (*ar->what == 'm') /* main? */
2743 lua_pushliteral(L, "main chunk");
2744 else if (*ar->what == 'C') {
2745 if (compat53_pushglobalfuncname(L, ar)) {
2746 lua_pushfstring(L, "function " LUA_QS, lua_tostring(L, -1));
2747 lua_remove(L, -2); /* remove name */
2748 }
2749 else
2750 lua_pushliteral(L, "?");
2751 }
2752 else
2753 lua_pushfstring(L, "function <%s:%d>", ar->short_src, ar->linedefined);
2754}
2755
2756#define COMPAT53_LEVELS1 12 /* size of the first part of the stack */
2757#define COMPAT53_LEVELS2 10 /* size of the second part of the stack */

Callers 1

luaL_tracebackFunction · 0.85

Calls 2

lua_pushfstringFunction · 0.85

Tested by

no test coverage detected