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