MCPcopy Create free account
hub / github.com/F-Stack/f-stack / luaF_getlocalname

Function luaF_getlocalname

freebsd/contrib/openzfs/module/lua/lfunc.c:149–159  ·  view source on GitHub ↗

** Look for n-th local variable at line `line' in function `func'. ** Returns NULL if not found. */

Source from the content-addressed store, hash-verified

147** Returns NULL if not found.
148*/
149const char *luaF_getlocalname (const Proto *f, int local_number, int pc) {
150 int i;
151 for (i = 0; i<f->sizelocvars && f->locvars[i].startpc <= pc; i++) {
152 if (pc < f->locvars[i].endpc) { /* is variable active? */
153 local_number--;
154 if (local_number == 0)
155 return getstr(f->locvars[i].varname);
156 }
157 }
158 return NULL; /* not found */
159}
160/* END CSTYLED */

Callers 3

findlocalFunction · 0.70
lua_getlocalFunction · 0.70
getobjnameFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected