From 6188f3a654c0380db08eb40a5465ce8e71c784f5 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 28 Dec 2020 16:34:07 -0300 Subject: Reset thread before panicking Before panicking, it is simpler to reset the thread instead of closing its variables and adjust the top manually. --- lstate.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lstate.h') diff --git a/lstate.h b/lstate.h index cbcf07e2..38a6c9b6 100644 --- a/lstate.h +++ b/lstate.h @@ -359,6 +359,7 @@ LUAI_FUNC void luaE_checkcstack (lua_State *L); LUAI_FUNC void luaE_incCstack (lua_State *L); LUAI_FUNC void luaE_warning (lua_State *L, const char *msg, int tocont); LUAI_FUNC void luaE_warnerror (lua_State *L, const char *where); +LUAI_FUNC int luaE_resetthread (lua_State *L, int status); #endif -- cgit v1.2.3-55-g6feb