aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2012-12-05 17:49:55 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2012-12-05 17:49:55 -0200
commit7ea68d84c4f7dbf82503a150a5b470808ad186ad (patch)
treed17d5fcc7cd40df207583d296698818b962fdd18
parent0e9167bc729c4faf99763166b17410d5ac896ccd (diff)
downloadlua-7ea68d84c4f7dbf82503a150a5b470808ad186ad.tar.gz
lua-7ea68d84c4f7dbf82503a150a5b470808ad186ad.tar.bz2
lua-7ea68d84c4f7dbf82503a150a5b470808ad186ad.zip
added comment
-rw-r--r--lapi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lapi.c b/lapi.c
index 9e7b864d..c4ad8461 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.168 2012/11/04 20:08:17 roberto Exp roberto $ 2** $Id: lapi.c,v 2.169 2012/12/05 19:09:23 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*/
@@ -196,7 +196,8 @@ LUA_API void lua_insert (lua_State *L, int idx) {
196 lua_lock(L); 196 lua_lock(L);
197 p = index2addr(L, idx); 197 p = index2addr(L, idx);
198 api_checkstackindex(L, idx, p); 198 api_checkstackindex(L, idx, p);
199 for (q = L->top; q>p; q--) setobjs2s(L, q, q-1); 199 for (q = L->top; q > p; q--) /* use L->top as a temporary */
200 setobjs2s(L, q, q - 1);
200 setobjs2s(L, p, L->top); 201 setobjs2s(L, p, L->top);
201 lua_unlock(L); 202 lua_unlock(L);
202} 203}