MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / lua_getupvalue

Function lua_getupvalue

3rd/lua-5.4.3/src/lapi.c:1376–1387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1374
1375
1376LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n) {
1377 const char *name;
1378 TValue *val = NULL; /* to avoid warnings */
1379 lua_lock(L);
1380 name = aux_upvalue(index2value(L, funcindex), n, &val, NULL);
1381 if (name) {
1382 setobj2s(L, L->top, val);
1383 api_incr_top(L);
1384 }
1385 lua_unlock(L);
1386 return name;
1387}
1388
1389
1390LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) {

Callers 1

auxupvalueFunction · 0.85

Calls 2

aux_upvalueFunction · 0.85
index2valueFunction · 0.85

Tested by

no test coverage detected