MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / addprototype

Function addprototype

src/Chain/libraries/glua/lparser.cpp:519–532  ·  view source on GitHub ↗

** adds a new prototype into list of prototypes */

Source from the content-addressed store, hash-verified

517** adds a new prototype into list of prototypes
518*/
519static Proto *addprototype(LexState *ls) {
520 Proto *clp;
521 lua_State *L = ls->L;
522 FuncState *fs = ls->fs;
523 Proto *f = fs->f; /* prototype of current function */
524 if (fs->np >= f->sizep) {
525 int oldsize = f->sizep;
526 luaM_growvector(L, f->p, fs->np, f->sizep, Proto *, MAXARG_Bx, "functions");
527 while (oldsize < f->sizep) f->p[oldsize++] = nullptr;
528 }
529 f->p[fs->np++] = clp = luaF_newproto(L);
530 luaC_objbarrier(L, f, clp);
531 return clp;
532}
533
534
535/*

Callers 1

bodyFunction · 0.85

Calls 1

luaF_newprotoFunction · 0.85

Tested by

no test coverage detected