[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Best way to save/re-load an lua state
- From: ketmar <ketmar@...>
- Date: Mon, 23 Mar 2009 08:04:42 +0200
On Mon, 23 Mar 2009 07:36:58 +0200
Asko Kauppi <askok@dnainternet.net> wrote:
> You might want to study the source code of Lanes. It does copy
> closures stack-to-stack and that could most likely be modified to
> serialize them as well.
i'm pretty sure it *can* be done in some or another way (never looked
at Lanes, tnx for hint), 'cause at least Pluto did it. what i mean is
that such thing should be a part of Lua itself (may be in a form of
standard library). for now writing such thing requires some sort of
deep knowledge of Lua internals. sure that a good C programmer can dive
in Lua sources and find all the necessary info, but it's not so
friendly as it can be.
> But even then, you won't be able to serialize userdata. I think
yes, userdata needs some sort of methamethods or other machinery.
so what i mean is that it can be done, but it's not so easy as a lazy
person like me want it to be. %-)