MCPcopy Create free account
hub / github.com/Tencent/xLua / lua_getupvalue

Function lua_getupvalue

WebGLPlugins/lapi.c:1221–1232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

mark_functionFunction · 0.85
auxupvalueFunction · 0.85
checkupvalFunction · 0.85

Calls 2

aux_upvalueFunction · 0.85
index2addrFunction · 0.85

Tested by

no test coverage detected