mirror of
https://github.com/lua/lua.git
synced 2025-01-28 06:03:00 +08:00
Move nothing when there is nothing to move
This commit is contained in:
parent
0ec4c473df
commit
a73ded2153
3
lapi.c
3
lapi.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lapi.c,v 1.238 2003/05/09 20:16:54 roberto Exp roberto $
|
** $Id: lapi.c,v 1.239 2003/05/14 21:06:56 roberto Exp roberto $
|
||||||
** Lua API
|
** Lua API
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -96,6 +96,7 @@ LUA_API int lua_checkstack (lua_State *L, int size) {
|
|||||||
|
|
||||||
LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) {
|
LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) {
|
||||||
int i;
|
int i;
|
||||||
|
if (from == to) return;
|
||||||
lua_lock(to);
|
lua_lock(to);
|
||||||
api_checknelems(from, n);
|
api_checknelems(from, n);
|
||||||
from->top -= n;
|
from->top -= n;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user