MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lua_getstack

Function lua_getstack

freebsd/contrib/openzfs/module/lua/ldebug.c:89–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 5

countlevelsFunction · 0.70
luaL_tracebackFunction · 0.70
luaL_argerrorFunction · 0.70
luaL_whereFunction · 0.70
luaB_costatusFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected