MCPcopy Create free account
hub / github.com/DFHack/dfhack / lua_setlocal

Function lua_setlocal

depends/lua/src/ldebug.c:196–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194
195
196LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) {
197 StkId pos = NULL; /* to avoid warnings */
198 const char *name;
199 lua_lock(L);
200 swapextra(L);
201 name = findlocal(L, ar->i_ci, n, &pos);
202 if (name) {
203 setobjs2s(L, pos, L->top - 1);
204 L->top--; /* pop value */
205 }
206 swapextra(L);
207 lua_unlock(L);
208 return name;
209}
210
211
212static void funcinfo (lua_Debug *ar, Closure *cl) {

Callers 1

db_setlocalFunction · 0.85

Calls 2

swapextraFunction · 0.85
findlocalFunction · 0.85

Tested by

no test coverage detected