MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / registerlocalvar

Function registerlocalvar

third-party/lua-5.2.4/src/lparser.c:165–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163
164
165static int registerlocalvar (LexState *ls, TString *varname) {
166 FuncState *fs = ls->fs;
167 Proto *f = fs->f;
168 int oldsize = f->sizelocvars;
169 luaM_growvector(ls->L, f->locvars, fs->nlocvars, f->sizelocvars,
170 LocVar, SHRT_MAX, "local variables");
171 while (oldsize < f->sizelocvars) f->locvars[oldsize++].varname = NULL;
172 f->locvars[fs->nlocvars].varname = varname;
173 luaC_objbarrier(ls->L, f, varname);
174 return fs->nlocvars++;
175}
176
177
178static void new_localvar (LexState *ls, TString *name) {

Callers 1

new_localvarFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected