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

Function lua_getupvalue

depends/lua/src/lapi.c:1222–1233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1220
1221
1222LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n) {
1223 const char *name;
1224 TValue *val = NULL; /* to avoid warnings */
1225 lua_lock(L);
1226 name = aux_upvalue(index2addr(L, funcindex), n, &val, NULL, NULL);
1227 if (name) {
1228 setobj2s(L, L->top, val);
1229 api_incr_top(L);
1230 }
1231 lua_unlock(L);
1232 return name;
1233}
1234
1235
1236LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) {

Callers 2

auxupvalueFunction · 0.85
checkupvalFunction · 0.85

Calls 2

aux_upvalueFunction · 0.85
index2addrFunction · 0.85

Tested by

no test coverage detected