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

Function addprototype

extlibs/lua/src/lparser.c:680–694  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

678** adds a new prototype into list of prototypes
679*/
680static Proto *addprototype (LexState *ls) {
681 Proto *clp;
682 lua_State *L = ls->L;
683 FuncState *fs = ls->fs;
684 Proto *f = fs->f; /* prototype of current function */
685 if (fs->np >= f->sizep) {
686 int oldsize = f->sizep;
687 luaM_growvector(L, f->p, fs->np, f->sizep, Proto *, MAXARG_Bx, "functions");
688 while (oldsize < f->sizep)
689 f->p[oldsize++] = NULL;
690 }
691 f->p[fs->np++] = clp = luaF_newproto(L);
692 luaC_objbarrier(L, f, clp);
693 return clp;
694}
695
696
697/*

Callers 1

bodyFunction · 0.85

Calls 1

luaF_newprotoFunction · 0.85

Tested by

no test coverage detected