| 129 | |
| 130 | |
| 131 | LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) { |
| 132 | int i; |
| 133 | if (from == to) return; |
| 134 | lua_lock(to); |
| 135 | api_checknelems(from, n); |
| 136 | api_check(from, G(from) == G(to), "moving among independent states"); |
| 137 | api_check(from, to->ci->top - to->top >= n, "stack overflow"); |
| 138 | from->top -= n; |
| 139 | for (i = 0; i < n; i++) { |
| 140 | setobjs2s(to, to->top, from->top + i); |
| 141 | to->top++; /* stack already checked by previous 'api_check' */ |
| 142 | } |
| 143 | lua_unlock(to); |
| 144 | } |
| 145 | |
| 146 | |
| 147 | LUA_API lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf) { |
no outgoing calls
no test coverage detected