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

Function lua_setlocal

third-party/lua-5.3.5/src/ldebug.c:195–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

db_setlocalFunction · 0.70

Calls 2

swapextraFunction · 0.70
findlocalFunction · 0.70

Tested by

no test coverage detected