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

Function lua_setlocal

freebsd/contrib/openzfs/module/lua/ldebug.c:174–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172
173
174LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) {
175 StkId pos = 0; /* to avoid warnings */
176 const char *name;
177 lua_lock(L);
178 swapextra(L);
179 name = findlocal(L, ar->i_ci, n, &pos);
180 if (name)
181 setobjs2s(L, pos, L->top - 1);
182 L->top--; /* pop value */
183 swapextra(L);
184 lua_unlock(L);
185 return name;
186}
187
188
189static void funcinfo (lua_Debug *ar, Closure *cl) {

Callers

nothing calls this directly

Calls 2

swapextraFunction · 0.85
findlocalFunction · 0.70

Tested by

no test coverage detected