| 188 | |
| 189 | |
| 190 | LUA_API void lua_insert (lua_State *L, int idx) { |
| 191 | StkId p; |
| 192 | StkId q; |
| 193 | lua_lock(L); |
| 194 | p = index2addr(L, idx); |
| 195 | api_checkstackindex(L, idx, p); |
| 196 | for (q = L->top; q > p; q--) /* use L->top as a temporary */ |
| 197 | setobjs2s(L, q, q - 1); |
| 198 | setobjs2s(L, p, L->top); |
| 199 | lua_unlock(L); |
| 200 | } |
| 201 | |
| 202 | |
| 203 | static void moveto (lua_State *L, TValue *fr, int idx) { |
no test coverage detected