aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-07-31 14:12:32 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-07-31 14:12:32 -0300
commit1a343814d8da9f9c2067d6ca3d82d57c84f91f10 (patch)
treec451a4dd76355900999026c90fac3cd6f0b71385 /lapi.c
parent280f7becb86fccd14122964341b4556754c31b3b (diff)
downloadlua-1a343814d8da9f9c2067d6ca3d82d57c84f91f10.tar.gz
lua-1a343814d8da9f9c2067d6ca3d82d57c84f91f10.tar.bz2
lua-1a343814d8da9f9c2067d6ca3d82d57c84f91f10.zip
details
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lapi.c b/lapi.c
index e401b7b1..6efdb505 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.44 2005/07/05 14:30:31 roberto Exp roberto $ 2** $Id: lapi.c,v 2.45 2005/07/06 18:07:30 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*/
@@ -113,11 +113,11 @@ LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) {
113 if (from == to) return; 113 if (from == to) return;
114 lua_lock(to); 114 lua_lock(to);
115 api_checknelems(from, n); 115 api_checknelems(from, n);
116 api_check(L, G(from) == G(to)); 116 api_check(from, G(from) == G(to));
117 api_check(from, to->ci->top - to->top >= n);
117 from->top -= n; 118 from->top -= n;
118 for (i = 0; i < n; i++) { 119 for (i = 0; i < n; i++) {
119 setobj2s(to, to->top, from->top + i); 120 setobj2s(to, to->top++, from->top + i);
120 api_incr_top(to);
121 } 121 }
122 lua_unlock(to); 122 lua_unlock(to);
123} 123}
@@ -975,9 +975,9 @@ LUA_API int lua_next (lua_State *L, int idx) {
975 975
976LUA_API void lua_concat (lua_State *L, int n) { 976LUA_API void lua_concat (lua_State *L, int n) {
977 lua_lock(L); 977 lua_lock(L);
978 luaC_checkGC(L);
979 api_checknelems(L, n); 978 api_checknelems(L, n);
980 if (n >= 2) { 979 if (n >= 2) {
980 luaC_checkGC(L);
981 luaV_concat(L, n, cast(int, L->top - L->base) - 1); 981 luaV_concat(L, n, cast(int, L->top - L->base) - 1);
982 L->top -= (n-1); 982 L->top -= (n-1);
983 } 983 }