MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / lua_getstack

Function lua_getstack

lib/lua/src/ldebug.c:160–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 8

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

Calls

no outgoing calls

Tested by

no test coverage detected