Minor tweaks and a new deque operator

This commit is contained in:
2021-07-20 14:48:53 -04:00
parent 08ca274444
commit 2930953569
10 changed files with 81 additions and 120 deletions

View File

@@ -64,9 +64,9 @@ void LuaSnap::serialize(StreamBuffer *sb) {
// Write dummy length, use eris to write data, then overwrite length.
sb->write_int64(0);
int64_t pos1 = sb->write_count();
int64_t pos1 = sb->total_writes();
eris_dump(state_, sb->lua_writer, sb->lua_writer_ud());
int64_t pos2 = sb->write_count();
int64_t pos2 = sb->total_writes();
sb->overwrite_int64(pos1, pos2 - pos1);
lua_settop(state_, 0);
std::cerr << "Eris dump is " << pos2-pos1 << " bytes." << std::endl;