lua-users home
lua-l archive

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


What about using lua_xmove. Does it handle table copy?

void lua_xmove (lua_State *from, lua_State *to, int n);

On Wed, Mar 17, 2010 at 11:01 AM, Mariusz Stanisz <mar@stonewatercontrols.com> wrote:
Tx


On Wed, Mar 17, 2010 at 10:53 AM, Philippe Lhoste <PhiLho@gmx.net> wrote:
On 17/03/2010 16:39, Mariusz Stanisz wrote:
What do you guys mean by "handle tables as keys" and "shared tables" .

local t = { 1, 2, 3 } -- shared table
local ct =
{
 a = t,
 b =
 {
   c = "a",
   d = t
 },
 [t] = "Table as key"
}

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --