MCPcopy Create free account
hub / github.com/danomatika/ofxLua / lua_setupvalue

Function lua_setupvalue

libs/lua/lapi.c:1398–1414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1396
1397
1398LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) {
1399 const char *name;
1400 TValue *val = NULL; /* to avoid warnings */
1401 GCObject *owner = NULL; /* to avoid warnings */
1402 TValue *fi;
1403 lua_lock(L);
1404 fi = index2value(L, funcindex);
1405 api_checknelems(L, 1);
1406 name = aux_upvalue(fi, n, &val, &owner);
1407 if (name) {
1408 L->top.p--;
1409 setobj(L, val, s2v(L->top.p));
1410 luaC_barrier(L, owner, val);
1411 }
1412 lua_unlock(L);
1413 return name;
1414}
1415
1416
1417static UpVal **getupvalref (lua_State *L, int fidx, int n, LClosure **pf) {

Callers 2

load_auxFunction · 0.85
auxupvalueFunction · 0.85

Calls 2

index2valueFunction · 0.85
aux_upvalueFunction · 0.85

Tested by

no test coverage detected