Reset thread before panicking

Before panicking, it is simpler to reset the thread instead of closing
its variables and adjust the top manually.
This commit is contained in:
Roberto Ierusalimschy
2020-12-28 16:34:07 -03:00
parent 7af27ef59d
commit 6188f3a654
3 changed files with 15 additions and 14 deletions

View File

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