eris: initialization and serialization for 'nextid' field

This commit is contained in:
2021-03-08 13:26:23 -05:00
parent f43009a3e2
commit 80b3e84c52
2 changed files with 3 additions and 0 deletions

View File

@@ -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) {

View File

@@ -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;
}