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

Function getupvalref

third-party/lua-5.3.5/src/lapi.c:1257–1265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1255
1256
1257static UpVal **getupvalref (lua_State *L, int fidx, int n, LClosure **pf) {
1258 LClosure *f;
1259 StkId fi = index2addr(L, fidx);
1260 api_check(L, ttisLclosure(fi), "Lua function expected");
1261 f = clLvalue(fi);
1262 api_check(L, (1 <= n && n <= f->p->sizeupvalues), "invalid upvalue index");
1263 if (pf) *pf = f;
1264 return &f->upvals[n - 1]; /* get its upvalue pointer */
1265}
1266
1267
1268LUA_API void *lua_upvalueid (lua_State *L, int fidx, int n) {

Callers 2

lua_upvalueidFunction · 0.70
lua_upvaluejoinFunction · 0.70

Calls 1

index2addrFunction · 0.70

Tested by

no test coverage detected