From 80b3e84c52314e4adebcb81d070b02b60d1613d3 Mon Sep 17 00:00:00 2001 From: Josh Yelon Date: Mon, 8 Mar 2021 13:26:23 -0500 Subject: [PATCH] eris: initialization and serialization for 'nextid' field --- luprex/eris-master/src/eris.c | 2 ++ luprex/eris-master/src/lstate.c | 1 + 2 files changed, 3 insertions(+) diff --git a/luprex/eris-master/src/eris.c b/luprex/eris-master/src/eris.c index c49c5f64..5695f41a 100644 --- a/luprex/eris-master/src/eris.c +++ b/luprex/eris-master/src/eris.c @@ -1705,6 +1705,7 @@ p_thread(Info *info) { /* ... thread */ /* Write general information. */ WRITE_VALUE(thread->status, uint8_t); + WRITE_VALUE(thread->nextid, uint64_t); WRITE_VALUE(eris_savestackidx(thread, eris_restorestack(thread, thread->errfunc)), size_t); /* These are only used while a thread is being executed or can be deduced: @@ -1871,6 +1872,7 @@ u_thread(Info *info) { /* ... */ /* Read general information. */ thread->status = READ_VALUE(uint8_t); + thread->nextid = READ_VALUE(uint64_t); thread->errfunc = eris_savestack(thread, eris_restorestackidx(thread, READ_VALUE(size_t))); if (thread->errfunc) { diff --git a/luprex/eris-master/src/lstate.c b/luprex/eris-master/src/lstate.c index c7f2672b..283668cb 100644 --- a/luprex/eris-master/src/lstate.c +++ b/luprex/eris-master/src/lstate.c @@ -217,6 +217,7 @@ static void preinit_state (lua_State *L, global_State *g) { L->nny = 1; L->status = LUA_OK; L->errfunc = 0; + L->nextid = 0; }