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

Function auxupvalue

third-party/lua-5.2.4/src/ldblib.c:213–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211
212
213static int auxupvalue (lua_State *L, int get) {
214 const char *name;
215 int n = luaL_checkint(L, 2);
216 luaL_checktype(L, 1, LUA_TFUNCTION);
217 name = get ? lua_getupvalue(L, 1, n) : lua_setupvalue(L, 1, n);
218 if (name == NULL) return 0;
219 lua_pushstring(L, name);
220 lua_insert(L, -(get+1));
221 return get + 1;
222}
223
224
225static int db_getupvalue (lua_State *L) {

Callers 2

db_getupvalueFunction · 0.70
db_setupvalueFunction · 0.70

Calls 5

luaL_checktypeFunction · 0.70
lua_getupvalueFunction · 0.70
lua_setupvalueFunction · 0.70
lua_pushstringFunction · 0.70
lua_insertFunction · 0.70

Tested by

no test coverage detected