MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / addprototype

Function addprototype

Dependencies/lua/src/lparser.c:698–712  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

696** adds a new prototype into list of prototypes
697*/
698static Proto *addprototype (LexState *ls) {
699 Proto *clp;
700 lua_State *L = ls->L;
701 FuncState *fs = ls->fs;
702 Proto *f = fs->f; /* prototype of current function */
703 if (fs->np >= f->sizep) {
704 int oldsize = f->sizep;
705 luaM_growvector(L, f->p, fs->np, f->sizep, Proto *, MAXARG_Bx, "functions");
706 while (oldsize < f->sizep)
707 f->p[oldsize++] = NULL;
708 }
709 f->p[fs->np++] = clp = luaF_newproto(L);
710 luaC_objbarrier(L, f, clp);
711 return clp;
712}
713
714
715/*

Callers 1

bodyFunction · 0.85

Calls 1

luaF_newprotoFunction · 0.85

Tested by

no test coverage detected