'onelua' can use the test library

Just add -DLUA_USER_H='"ltests.h"' when compiling it.
This commit is contained in:
Roberto Ierusalimschy
2025-07-29 14:35:04 -03:00
parent c33bb08ffe
commit 8fddca81e7
4 changed files with 34 additions and 13 deletions

View File

@@ -1177,7 +1177,11 @@ LUALIB_API unsigned int luaL_makeseed (lua_State *L) {
}
LUALIB_API lua_State *luaL_newstate (void) {
/*
** Use the name with parentheses so that headers can redefine it
** as a macro.
*/
LUALIB_API lua_State *(luaL_newstate) (void) {
lua_State *L = lua_newstate(l_alloc, NULL, luai_makeseed());
if (l_likely(L)) {
lua_atpanic(L, &panic);