Advertisement
Guest User

Untitled

a guest
May 5th, 2011
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) {
  2.   int i;
  3.   if (from == to) return;
  4.   lua_lock(to);
  5.   api_checknelems(from, n);
  6.   api_check(from, G(from) == G(to));
  7.   api_check(from, to->ci->top - to->top >= n);
  8.   from->top -= n;
  9.   for (i = 0; i < n; i++) {
  10.     setobj2s(to, to->top++, from->top + i);
  11.   }
  12.   lua_unlock(to);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement