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

Function PrintHeader

extlibs/lua/src/luac.c:669–687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

667#define S(x) (int)(x),SS(x)
668
669static void PrintHeader(const Proto* f)
670{
671 const char* s=f->source ? getstr(f->source) : "=?";
672 if (*s=='@' || *s=='=')
673 s++;
674 else if (*s==LUA_SIGNATURE[0])
675 s="(bstring)";
676 else
677 s="(string)";
678 printf("\n%s <%s:%d,%d> (%d instruction%s at %p)\n",
679 (f->linedefined==0)?"main":"function",s,
680 f->linedefined,f->lastlinedefined,
681 S(f->sizecode),VOID(f));
682 printf("%d%s param%s, %d slot%s, %d upvalue%s, ",
683 (int)(f->numparams),f->is_vararg?"+":"",SS(f->numparams),
684 S(f->maxstacksize),S(f->sizeupvalues));
685 printf("%d local%s, %d constant%s, %d function%s\n",
686 S(f->sizelocvars),S(f->sizek),S(f->sizep));
687}
688
689static void PrintDebug(const Proto* f)
690{

Callers 1

PrintFunctionFunction · 0.85

Calls 1

printfFunction · 0.85

Tested by

no test coverage detected