MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / lua_getstack

Function lua_getstack

libraries/AP_Scripting/lua/src/ldebug.c:111–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109
110
111LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar) {
112 int status;
113 CallInfo *ci;
114 if (level < 0) return 0; /* invalid (negative) level */
115 lua_lock(L);
116 for (ci = L->ci; level > 0 && ci != &L->base_ci; ci = ci->previous)
117 level--;
118 if (level == 0 && ci != &L->base_ci) { /* level found? */
119 status = 1;
120 ar->i_ci = ci;
121 }
122 else status = 0; /* no such level */
123 lua_unlock(L);
124 return status;
125}
126
127
128static const char *upvalname (Proto *p, int uv) {

Callers 9

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

Calls

no outgoing calls

Tested by

no test coverage detected