| 201 | |
| 202 | |
| 203 | static void moveto (lua_State *L, TValue *fr, int idx) { |
| 204 | TValue *to = index2addr(L, idx); |
| 205 | api_checkvalidindex(L, to); |
| 206 | setobj(L, to, fr); |
| 207 | if (idx < LUA_REGISTRYINDEX) /* function upvalue? */ |
| 208 | luaC_barrier(L, clCvalue(L->ci->func), fr); |
| 209 | /* LUA_REGISTRYINDEX does not need gc barrier |
| 210 | (collector revisits it before finishing collection) */ |
| 211 | } |
| 212 | |
| 213 | |
| 214 | LUA_API void lua_replace (lua_State *L, int idx) { |
no test coverage detected