** Change back all offsets into pointers. */
| 180 | ** Change back all offsets into pointers. |
| 181 | */ |
| 182 | static void correctstack (lua_State *L) { |
| 183 | CallInfo *ci; |
| 184 | UpVal *up; |
| 185 | L->top.p = restorestack(L, L->top.offset); |
| 186 | L->tbclist.p = restorestack(L, L->tbclist.offset); |
| 187 | for (up = L->openupval; up != NULL; up = up->u.open.next) |
| 188 | up->v.p = s2v(restorestack(L, up->v.offset)); |
| 189 | for (ci = L->ci; ci != NULL; ci = ci->previous) { |
| 190 | ci->top.p = restorestack(L, ci->top.offset); |
| 191 | ci->func.p = restorestack(L, ci->func.offset); |
| 192 | if (isLua(ci)) |
| 193 | ci->u.l.trap = 1; /* signal to update 'trap' in 'luaV_execute' */ |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | |
| 198 | /* some space for error handling */ |