[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua persistence library?
- From: Edgar Toernig <froese@...>
- Date: Thu, 26 Apr 2001 03:06:08 +0200
Chuck Messenger wrote:
>
> struct {
> char *name;
> void *addr;
> } lua_extern_t;
>[...]
> The entire Lua state would be saved, including the
> lock status of objects, tag methods, etc.
And how are you going to restore the state associated
with these userdata objects? They will normally hold
file descriptors, sockets, or any other complex data
structure? Often state that is _impossible_ to save
and restore. IMHO just forget about trying this kind
of snapshotting. Saving basic Lua types (numbers,
strings, tables, eventually Lua functions) is ok. At
the moment you try to touch C functions or userdata
objects you'll lose.
Ciao, ET.