[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Moving an element on the stack
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 3 Mar 2010 14:55:34 +0200
On Wed, Mar 3, 2010 at 2:51 PM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
> If you want to exchange aTable and aFunction, there's a third way:
> lua_pushvalue(L, 1);
> lua_pushvalue(L, 2);
> lua_replace(L, 1);
> lua_replace(L, 2);
I've always missed a simple swap the top two elements operation, personally