MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / funcinfo

Function funcinfo

third-party/lua-5.4.6/src/ldebug.c:259–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

auxgetinfoFunction · 0.70

Calls 1

luaO_chunkidFunction · 0.70

Tested by

no test coverage detected