MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / registerlocalvar

Function registerlocalvar

Source/Misc/lua/src/lua.c:7719–7729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7717
7718
7719static int registerlocalvar (LexState *ls, TString *varname) {
7720FuncState *fs = ls->fs;
7721Proto *f = fs->f;
7722int oldsize = f->sizelocvars;
7723luaM_growvector(ls->L, f->locvars, fs->nlocvars, f->sizelocvars,
7724LocVar, SHRT_MAX, "too many local variables");
7725while (oldsize < f->sizelocvars) f->locvars[oldsize++].varname = NULL;
7726f->locvars[fs->nlocvars].varname = varname;
7727luaC_objbarrier(ls->L, f, varname);
7728return fs->nlocvars++;
7729}
7730
7731
7732#define new_localvarliteral(ls,v,n) \

Callers 1

new_localvarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected