MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / addprototype

Function addprototype

xrepo/packages/l/lua/port/lua/src/lparser.c:697–711  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 1

bodyFunction · 0.85

Calls 1

luaF_newprotoFunction · 0.70

Tested by

no test coverage detected