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

Function auxupvalue

Source/Misc/lua/src/lua.c:11695–11705  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11693
11694
11695static int auxupvalue (lua_State *L, int get) {
11696const char *name;
11697int n = luaL_checkint(L, 2);
11698luaL_checktype(L, 1, LUA_TFUNCTION);
11699if (lua_iscfunction(L, 1)) return 0; /* cannot touch C upvalues from Lua */
11700name = get ? lua_getupvalue(L, 1, n) : lua_setupvalue(L, 1, n);
11701if (name == NULL) return 0;
11702lua_pushstring(L, name);
11703lua_insert(L, -(get+1));
11704return get + 1;
11705}
11706
11707
11708static int db_getupvalue (lua_State *L) {

Callers 2

db_getupvalueFunction · 0.85
db_setupvalueFunction · 0.85

Calls 6

luaL_checktypeFunction · 0.85
lua_iscfunctionFunction · 0.85
lua_getupvalueFunction · 0.85
lua_setupvalueFunction · 0.85
lua_pushstringFunction · 0.85
lua_insertFunction · 0.85

Tested by

no test coverage detected