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

Function funcinfo

third-party/lua-5.5.0/src/ldebug.c:259–281  ·  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 = getlstr(p->source, ar->srclen);
271 }
272 else {
273 ar->source = "=?";
274 ar->srclen = LL("=?");
275 }
276 ar->linedefined = p->linedefined;
277 ar->lastlinedefined = p->lastlinedefined;
278 ar->what = (ar->linedefined == 0) ? "main" : "Lua";
279 }
280 luaO_chunkid(ar->short_src, ar->source, ar->srclen);
281}
282
283
284static 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