mirror of
https://github.com/lua/lua
synced 2025-02-13 03:34:04 +03:00
added comment
This commit is contained in:
parent
0e9167bc72
commit
7ea68d84c4
5
lapi.c
5
lapi.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lapi.c,v 2.168 2012/11/04 20:08:17 roberto Exp roberto $
|
||||
** $Id: lapi.c,v 2.169 2012/12/05 19:09:23 roberto Exp roberto $
|
||||
** Lua API
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -196,7 +196,8 @@ LUA_API void lua_insert (lua_State *L, int idx) {
|
||||
lua_lock(L);
|
||||
p = index2addr(L, idx);
|
||||
api_checkstackindex(L, idx, p);
|
||||
for (q = L->top; q>p; q--) setobjs2s(L, q, q-1);
|
||||
for (q = L->top; q > p; q--) /* use L->top as a temporary */
|
||||
setobjs2s(L, q, q - 1);
|
||||
setobjs2s(L, p, L->top);
|
||||
lua_unlock(L);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user