World serialization done (not well-tested yet)

This commit is contained in:
2021-03-16 12:19:37 -04:00
parent 7c9fd1e46b
commit a64e339b6b
8 changed files with 111 additions and 52 deletions

View File

@@ -20,7 +20,6 @@
class LuaSnap {
private:
lua_State *state_;
StreamBuffer snapshot_;
public:
LuaSnap();
@@ -37,22 +36,6 @@ public:
// Restore the the lua interpreter given a serialized state.
//
void deserialize(StreamBuffer *sb);
// Return true if there's a saved snapshot.
//
bool have_snapshot() const;
// snapshot the state of the lua interpreter.
//
// If there is already a snapshot, this panics.
//
void snapshot();
// Rollback the lua intepreter to the snapshotted state.
//
// If there is no snapshot, this panics.
//
void rollback();
};