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

Function getupvalref

third-party/lua-5.5.0/src/lapi.c:1427–1438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1425
1426
1427static UpVal **getupvalref (lua_State *L, int fidx, int n, LClosure **pf) {
1428 static const UpVal *const nullup = NULL;
1429 LClosure *f;
1430 TValue *fi = index2value(L, fidx);
1431 api_check(L, ttisLclosure(fi), "Lua function expected");
1432 f = clLvalue(fi);
1433 if (pf) *pf = f;
1434 if (1 <= n && n <= f->p->sizeupvalues)
1435 return &f->upvals[n - 1]; /* get its upvalue pointer */
1436 else
1437 return (UpVal**)&nullup;
1438}
1439
1440
1441LUA_API void *lua_upvalueid (lua_State *L, int fidx, int n) {

Callers 2

lua_upvalueidFunction · 0.70
lua_upvaluejoinFunction · 0.70

Calls 1

index2valueFunction · 0.70

Tested by

no test coverage detected