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

Function lua_getstack

third-party/lua-5.5.0/src/ldebug.c:162–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 13

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
GetStacksMethod · 0.50
CreateEnvMethod · 0.50
GetStackLevelMethod · 0.50
LastLevelFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected