[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Not able to copy Lua closures between states
- From: askok@...
- Date: Thu, 03 Jul 2008 14:38:31 +0300
It was not about lua_xmove.
The technique Patrick Donnelly suggested should work
('lua_load' sets upvalues to nil, then I set them up using
the Debug API).
On Thu, 3 Jul 2008 07:51:35 -0300
Luiz Henrique de Figueiredo <email@example.com>
There's been request to have full closure copying
between detached Lua
states. I think this can currently be done for C-based
not for Lua ones.
Like I said earflier, it is *not* possible to copy
unrelated states using lua_xmove, if that's what you
mean. It may seem
to work in some cases but unrelated states have disjoint
gc lists and
string pools. Once gc runs in the source state it may
leave bad pointers
in the target state.