lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hallo,

On 2/13/06, Sokolov Yura <falcon@intercable.ru> wrote:
> Am I wrong or there is no any way to make a copy of stack cell in the
> official API?
> May be it would be usefull to have a simple function:
>
> lua_dup
>           void lua_dup (lua_State *L, int index);
>
> Pushes the element at the given position on the top without removal (
> copies them).
>

     Maybe you are looking for lua_pushvalue()?

--
-alex
http://www.ventonegro.org/