MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / lua_setlocal

Function lua_setlocal

lib/lua/src/ldebug.c:242–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240
241
242LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) {
243 StkId pos = NULL; /* to avoid warnings */
244 const char *name;
245 lua_lock(L);
246 name = luaG_findlocal(L, ar->i_ci, n, &pos);
247 if (name) {
248 setobjs2s(L, pos, L->top.p - 1);
249 L->top.p--; /* pop value */
250 }
251 lua_unlock(L);
252 return name;
253}
254
255
256static void funcinfo (lua_Debug *ar, Closure *cl) {

Callers 1

db_setlocalFunction · 0.85

Calls 1

luaG_findlocalFunction · 0.85

Tested by

no test coverage detected