MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / funcinfo

Function funcinfo

3rd/lua-5.4.3/src/ldebug.c:256–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254
255
256static void funcinfo (lua_Debug *ar, Closure *cl) {
257 if (noLuaClosure(cl)) {
258 ar->source = "=[C]";
259 ar->srclen = LL("=[C]");
260 ar->linedefined = -1;
261 ar->lastlinedefined = -1;
262 ar->what = "C";
263 }
264 else {
265 const Proto *p = cl->l.p;
266 if (p->source) {
267 ar->source = getstr(p->source);
268 ar->srclen = tsslen(p->source);
269 }
270 else {
271 ar->source = "=?";
272 ar->srclen = LL("=?");
273 }
274 ar->linedefined = p->linedefined;
275 ar->lastlinedefined = p->lastlinedefined;
276 ar->what = (ar->linedefined == 0) ? "main" : "Lua";
277 }
278 luaO_chunkid(ar->short_src, ar->source, ar->srclen);
279}
280
281
282static 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