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

Function getupvalref

third-party/lua-5.2.4/src/lapi.c:1246–1254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1244
1245
1246static UpVal **getupvalref (lua_State *L, int fidx, int n, LClosure **pf) {
1247 LClosure *f;
1248 StkId fi = index2addr(L, fidx);
1249 api_check(L, ttisLclosure(fi), "Lua function expected");
1250 f = clLvalue(fi);
1251 api_check(L, (1 <= n && n <= f->p->sizeupvalues), "invalid upvalue index");
1252 if (pf) *pf = f;
1253 return &f->upvals[n - 1]; /* get its upvalue pointer */
1254}
1255
1256
1257LUA_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