diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-07-07 10:34:25 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-07-07 10:34:25 -0300 |
commit | a73ded21535c79a081cae16b12482e3e70441e6c (patch) | |
tree | c659561829a0911e093c0e9d748b1da3812e073e | |
parent | 0ec4c473df871ce88d3c06f7a801c557cb7f9d86 (diff) | |
download | lua-a73ded21535c79a081cae16b12482e3e70441e6c.tar.gz lua-a73ded21535c79a081cae16b12482e3e70441e6c.tar.bz2 lua-a73ded21535c79a081cae16b12482e3e70441e6c.zip |
Move nothing when there is nothing to move
-rw-r--r-- | lapi.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.238 2003/05/09 20:16:54 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.239 2003/05/14 21:06:56 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -96,6 +96,7 @@ LUA_API int lua_checkstack (lua_State *L, int size) { | |||
96 | 96 | ||
97 | LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) { | 97 | LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) { |
98 | int i; | 98 | int i; |
99 | if (from == to) return; | ||
99 | lua_lock(to); | 100 | lua_lock(to); |
100 | api_checknelems(from, n); | 101 | api_checknelems(from, n); |
101 | from->top -= n; | 102 | from->top -= n; |