MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / lua_getinfo

Function lua_getinfo

ThirdParty/lua/lua/ldebug.c:267–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265
266
267LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) {
268 int status;
269 Closure *cl;
270 CallInfo *ci;
271 StkId func;
272 lua_lock(L);
273 if (*what == '>') {
274 ci = NULL;
275 func = L->top - 1;
276 api_check(ttisfunction(func), "function expected");
277 what++; /* skip the '>' */
278 L->top--; /* pop function */
279 }
280 else {
281 ci = ar->i_ci;
282 func = ci->func;
283 lua_assert(ttisfunction(ci->func));
284 }
285 cl = ttisclosure(func) ? clvalue(func) : NULL;
286 status = auxgetinfo(L, what, ar, cl, ci);
287 if (strchr(what, 'f')) {
288 setobjs2s(L, L->top, func);
289 api_incr_top(L);
290 }
291 if (strchr(what, 'L'))
292 collectvalidlines(L, cl);
293 lua_unlock(L);
294 return status;
295}
296
297
298/*

Callers 7

pushglobalfuncnameFunction · 0.85
luaL_tracebackFunction · 0.85
luaL_argerrorFunction · 0.85
luaL_whereFunction · 0.85
set_envFunction · 0.85
db_getinfoFunction · 0.85
hookfFunction · 0.85

Calls 2

auxgetinfoFunction · 0.85
collectvalidlinesFunction · 0.85

Tested by

no test coverage detected