MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / db_getlocal

Function db_getlocal

Source/Misc/lua/src/lua.c:11660–11678  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11658
11659
11660static int db_getlocal (lua_State *L) {
11661int arg;
11662lua_State *L1 = getthread(L, &arg);
11663lua_Debug ar;
11664const char *name;
11665if (!lua_getstack(L1, luaL_checkint(L, arg+1), &ar)) /* out of range? */
11666return luaL_argerror(L, arg+1, "level out of range");
11667name = lua_getlocal(L1, &ar, luaL_checkint(L, arg+2));
11668if (name) {
11669lua_xmove(L1, L, 1);
11670lua_pushstring(L, name);
11671lua_pushvalue(L, -2);
11672return 2;
11673}
11674else {
11675lua_pushnil(L);
11676return 1;
11677}
11678}
11679
11680
11681static int db_setlocal (lua_State *L) {

Callers

nothing calls this directly

Calls 8

getthreadFunction · 0.85
lua_getstackFunction · 0.85
luaL_argerrorFunction · 0.85
lua_getlocalFunction · 0.85
lua_xmoveFunction · 0.85
lua_pushstringFunction · 0.85
lua_pushvalueFunction · 0.85
lua_pushnilFunction · 0.85

Tested by

no test coverage detected