'luaD_seterrorobj' should not raise errors

This function can be called unprotected, so it should not raise any
kind of errors. (It could raise a memory-allocation error when creating
a message).
This commit is contained in:
Roberto Ierusalimschy
2025-03-12 15:51:16 -03:00
parent d9e0f64a5d
commit c931d86e98
5 changed files with 25 additions and 22 deletions

1
ldo.h
View File

@@ -67,6 +67,7 @@
/* type of protected functions, to be ran by 'runprotected' */
typedef void (*Pfunc) (lua_State *L, void *ud);
LUAI_FUNC l_noret luaD_errerr (lua_State *L);
LUAI_FUNC void luaD_seterrorobj (lua_State *L, TStatus errcode, StkId oldtop);
LUAI_FUNC TStatus luaD_protectedparser (lua_State *L, ZIO *z,
const char *name,