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

Function compat53_pushfuncname

Libs/sol/sol.hpp:3256–3271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3254}
3255
3256static void compat53_pushfuncname(lua_State* L, lua_Debug* ar) {
3257 if (*ar->namewhat != '\0') /* is there a name? */
3258 lua_pushfstring(L, "function " LUA_QS, ar->name);
3259 else if (*ar->what == 'm') /* main? */
3260 lua_pushliteral(L, "main chunk");
3261 else if (*ar->what == 'C') {
3262 if (compat53_pushglobalfuncname(L, ar)) {
3263 lua_pushfstring(L, "function " LUA_QS, lua_tostring(L, -1));
3264 lua_remove(L, -2); /* remove name */
3265 }
3266 else
3267 lua_pushliteral(L, "?");
3268 }
3269 else
3270 lua_pushfstring(L, "function <%s:%d>", ar->short_src, ar->linedefined);
3271}
3272
3273#define COMPAT53_LEVELS1 12 /* size of the first part of the stack */
3274#define COMPAT53_LEVELS2 10 /* size of the second part of the stack */

Callers 1

luaL_tracebackFunction · 0.85

Calls 1

Tested by

no test coverage detected