MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / lua_getstack

Function lua_getstack

src/Chain/libraries/glua/ldebug.cpp:133–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131
132
133LUA_API int lua_getstack(lua_State *L, int level, lua_Debug *ar) {
134 int status;
135 CallInfo *ci;
136 if (level < 0) return 0; /* invalid (negative) level */
137 lua_lock(L);
138 for (ci = L->ci; level > 0 && ci != &L->base_ci; ci = ci->previous)
139 level--;
140 if (level == 0 && ci != &L->base_ci) { /* level found? */
141 status = 1;
142 ar->i_ci = ci;
143 }
144 else status = 0; /* no such level */
145 lua_unlock(L);
146 return status;
147}
148
149
150static const char *upvalname(Proto *p, int uv) {

Callers 9

luaB_costatusFunction · 0.85
set_envFunction · 0.85
lastlevelFunction · 0.85
luaL_tracebackFunction · 0.85
luaL_argerrorFunction · 0.85
luaL_whereFunction · 0.85
db_getinfoFunction · 0.85
db_getlocalFunction · 0.85
db_setlocalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected