MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / PrintHeader

Function PrintHeader

deps/lua/src/print.c:161–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159#define S(x) x,SS(x)
160
161static void PrintHeader(const Proto* f)
162{
163 const char* s=getstr(f->source);
164 if (*s=='@' || *s=='=')
165 s++;
166 else if (*s==LUA_SIGNATURE[0])
167 s="(bstring)";
168 else
169 s="(string)";
170 printf("\n%s <%s:%d,%d> (%d instruction%s, %d bytes at %p)\n",
171 (f->linedefined==0)?"main":"function",s,
172 f->linedefined,f->lastlinedefined,
173 S(f->sizecode),f->sizecode*Sizeof(Instruction),VOID(f));
174 printf("%d%s param%s, %d slot%s, %d upvalue%s, ",
175 f->numparams,f->is_vararg?"+":"",SS(f->numparams),
176 S(f->maxstacksize),S(f->nups));
177 printf("%d local%s, %d constant%s, %d function%s\n",
178 S(f->sizelocvars),S(f->sizek),S(f->sizep));
179}
180
181static void PrintConstants(const Proto* f)
182{

Callers 2

PrintToMethod · 0.85
PrintFunctionFunction · 0.85

Calls

no outgoing calls

Tested by 1

PrintToMethod · 0.68