MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / lua_getstack

Function lua_getstack

extlibs/lua/src/ldebug.c:166–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 12

lastlevelFunction · 0.85
luaL_tracebackFunction · 0.85
luaL_argerrorFunction · 0.85
luaL_whereFunction · 0.85
auxstatusFunction · 0.85
db_getinfoFunction · 0.85
db_getlocalFunction · 0.85
db_setlocalFunction · 0.85
compat53_countlevelsFunction · 0.85
luaL_tracebackFunction · 0.85
getMethod · 0.85
statusMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected