MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / funcinfo

Function funcinfo

extlibs/lua/src/ldebug.c:262–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260
261
262static void funcinfo (lua_Debug *ar, Closure *cl) {
263 if (noLuaClosure(cl)) {
264 ar->source = "=[C]";
265 ar->srclen = LL("=[C]");
266 ar->linedefined = -1;
267 ar->lastlinedefined = -1;
268 ar->what = "C";
269 }
270 else {
271 const Proto *p = cl->l.p;
272 if (p->source) {
273 ar->source = getstr(p->source);
274 ar->srclen = tsslen(p->source);
275 }
276 else {
277 ar->source = "=?";
278 ar->srclen = LL("=?");
279 }
280 ar->linedefined = p->linedefined;
281 ar->lastlinedefined = p->lastlinedefined;
282 ar->what = (ar->linedefined == 0) ? "main" : "Lua";
283 }
284 luaO_chunkid(ar->short_src, ar->source, ar->srclen);
285}
286
287
288static int nextline (const Proto *p, int currentline, int pc) {

Callers 1

auxgetinfoFunction · 0.85

Calls 1

luaO_chunkidFunction · 0.85

Tested by

no test coverage detected