MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / lua_getstack

Function lua_getstack

ThirdParty/lua/lua/ldebug.c:83–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82
83LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar) {
84 int status;
85 CallInfo *ci;
86 if (level < 0) return 0; /* invalid (negative) level */
87 lua_lock(L);
88 for (ci = L->ci; level > 0 && ci != &L->base_ci; ci = ci->previous)
89 level--;
90 if (level == 0 && ci != &L->base_ci) { /* level found? */
91 status = 1;
92 ar->i_ci = ci;
93 }
94 else status = 0; /* no such level */
95 lua_unlock(L);
96 return status;
97}
98
99
100static const char *upvalname (Proto *p, int uv) {

Callers 9

countlevelsFunction · 0.85
luaL_tracebackFunction · 0.85
luaL_argerrorFunction · 0.85
luaL_whereFunction · 0.85
luaB_costatusFunction · 0.85
set_envFunction · 0.85
db_getinfoFunction · 0.85
db_getlocalFunction · 0.85
db_setlocalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected