| 211 | |
| 212 | |
| 213 | static 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 | |
| 225 | static int db_getupvalue (lua_State *L) { |
no test coverage detected