MCPcopy Create free account
hub / github.com/DFHack/dfhack / funcinfo

Function funcinfo

depends/lua/src/ldebug.c:212–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210
211
212static void funcinfo (lua_Debug *ar, Closure *cl) {
213 if (noLuaClosure(cl)) {
214 ar->source = "=[C]";
215 ar->linedefined = -1;
216 ar->lastlinedefined = -1;
217 ar->what = "C";
218 }
219 else {
220 Proto *p = cl->l.p;
221 ar->source = p->source ? getstr(p->source) : "=?";
222 ar->linedefined = p->linedefined;
223 ar->lastlinedefined = p->lastlinedefined;
224 ar->what = (ar->linedefined == 0) ? "main" : "Lua";
225 }
226 luaO_chunkid(ar->short_src, ar->source, LUA_IDSIZE);
227}
228
229
230static void collectvalidlines (lua_State *L, Closure *f) {

Callers 1

auxgetinfoFunction · 0.85

Calls 1

luaO_chunkidFunction · 0.85

Tested by

no test coverage detected