MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / lua_getstack

Function lua_getstack

third-party/lua-5.4.6/src/ldebug.c:163–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161
162
163LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar) {
164 int status;
165 CallInfo *ci;
166 if (level < 0) return 0; /* invalid (negative) level */
167 lua_lock(L);
168 for (ci = L->ci; level > 0 && ci != &L->base_ci; ci = ci->previous)
169 level--;
170 if (level == 0 && ci != &L->base_ci) { /* level found? */
171 status = 1;
172 ar->i_ci = ci;
173 }
174 else status = 0; /* no such level */
175 lua_unlock(L);
176 return status;
177}
178
179
180static const char *upvalname (const Proto *p, int uv) {

Callers 8

lastlevelFunction · 0.70
luaL_tracebackFunction · 0.70
luaL_argerrorFunction · 0.70
luaL_whereFunction · 0.70
auxstatusFunction · 0.70
db_getinfoFunction · 0.70
db_getlocalFunction · 0.70
db_setlocalFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected