MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / PrintHeader

Function PrintHeader

lib/lua/src/luac.c:668–686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

PrintFunctionFunction · 0.85

Calls 1

SFunction · 0.50

Tested by

no test coverage detected