[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Archiving lua_state to disk/memory
- From: "Peter Prade" <prade@...>
- Date: Thu, 4 Oct 2001 21:43:54 +0200
save.lua in the test directory of the lua distribution does exactly what you
are looking for.
(i guess you only need global variables saved, not the entire state
including stack etc.)
[mailto:firstname.lastname@example.org]On Behalf Of Brian Hook
Sent: Thursday, October 04, 2001 9:03 PM
To: Multiple recipients of list
Subject: Archiving lua_state to disk/memory
Is there a simple way to archive an existing lua_state to disk (the
opposite of lua_dobuffer, e.g. a lua_writebuffer type of thing), or
should I just handle it myself by iterating over all the tables and
writing out the values?
I have some configuration files that are loaded and potentially
modified, and I'd like to write them out. I don't mind parsing and
writing it out myself, but if something like this already exists, I'd
like to avoid the extra work.