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

Function compat53_pushglobalfuncname

Libs/sol/sol.hpp:3241–3254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3239}
3240
3241static int compat53_pushglobalfuncname(lua_State* L, lua_Debug* ar) {
3242 int top = lua_gettop(L);
3243 lua_getinfo(L, "f", ar); /* push function */
3244 lua_pushvalue(L, LUA_GLOBALSINDEX);
3245 if (compat53_findfield(L, top + 1, 2)) {
3246 lua_copy(L, -1, top + 1); /* move name to proper place */
3247 lua_pop(L, 2); /* remove pushed values */
3248 return 1;
3249 }
3250 else {
3251 lua_settop(L, top); /* remove function and global table */
3252 return 0;
3253 }
3254}
3255
3256static void compat53_pushfuncname(lua_State* L, lua_Debug* ar) {
3257 if (*ar->namewhat != '\0') /* is there a name? */

Callers 1

compat53_pushfuncnameFunction · 0.85

Calls 2

compat53_findfieldFunction · 0.85
lua_copyFunction · 0.85

Tested by

no test coverage detected