| 276 | |
| 277 | #ifndef PLUTO_LUA_LINKABLE |
| 278 | LUA_API void lua_insert (lua_State *L, int idx) { |
| 279 | StkId p, t; |
| 280 | TValue temp; |
| 281 | lua_lock(L); |
| 282 | p = index2stack(L, idx); /* start of segment */ |
| 283 | setobj(L, &temp, s2v(L->top.p - 1)); |
| 284 | for (t = L->top.p - 1; t > p; --t) { /* end of stack segment being rotated */ |
| 285 | setobjs2s(L, t, t - 1); |
| 286 | } |
| 287 | setobj2s(L, p, &temp); |
| 288 | lua_unlock(L); |
| 289 | } |
| 290 | |
| 291 | LUA_API void lua_remove (lua_State *L, int idx) { |
| 292 | StkId p, t; |
no test coverage detected