MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / lua_setlocal

Function lua_setlocal

src/Chain/libraries/glua/ldebug.cpp:218–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216
217
218LUA_API const char *lua_setlocal(lua_State *L, const lua_Debug *ar, int n) {
219 StkId pos = nullptr; /* to avoid warnings */
220 const char *name;
221 lua_lock(L);
222 swapextra(L);
223 name = findlocal(L, ar->i_ci, n, &pos);
224 if (name) {
225 setobjs2s(L, pos, L->top - 1);
226 L->top--; /* pop value */
227 }
228 swapextra(L);
229 lua_unlock(L);
230 return name;
231}
232
233
234static 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