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