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

Function lua_getstack

third-party/lua-5.2.4/src/ldebug.c:93–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91
92
93LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar) {
94 int status;
95 CallInfo *ci;
96 if (level < 0) return 0; /* invalid (negative) level */
97 lua_lock(L);
98 for (ci = L->ci; level > 0 && ci != &L->base_ci; ci = ci->previous)
99 level--;
100 if (level == 0 && ci != &L->base_ci) { /* level found? */
101 status = 1;
102 ar->i_ci = ci;
103 }
104 else status = 0; /* no such level */
105 lua_unlock(L);
106 return status;
107}
108
109
110static const char *upvalname (Proto *p, int uv) {

Callers 9

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

Calls

no outgoing calls

Tested by

no test coverage detected