lua-users home
lua-l archive

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

On Wed, Mar 3, 2010 at 10:51 AM, Luiz Henrique de Figueiredo <> 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);
At least this avoids the data movemement implied by lua_insert.

Thanks both.

Regarding the lua_settop question (method #2), are those values subject to GC while I've temporarily changed the top, right?