MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / lua_setupvalue

Function lua_setupvalue

Source/Misc/lua/src/lua.c:2920–2935  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2918
2919
2920LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) {
2921const char *name;
2922TValue *val;
2923StkId fi;
2924lua_lock(L);
2925fi = index2adr(L, funcindex);
2926api_checknelems(L, 1);
2927name = aux_upvalue(fi, n, &val);
2928if (name) {
2929L->top--;
2930setobj(L, val, L->top);
2931luaC_barrier(L, clvalue(fi), L->top);
2932}
2933lua_unlock(L);
2934return name;
2935}
2936
2937/*
2938** $Id: llex.h,v 1.58.1.1 2007/12/27 13:02:25 roberto Exp $

Callers 2

setupvalueFunction · 0.85
auxupvalueFunction · 0.85

Calls 2

index2adrFunction · 0.85
aux_upvalueFunction · 0.85

Tested by

no test coverage detected