From 8fddca81e7d4137512e92f398ca638d61b935dbd Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 29 Jul 2025 14:35:04 -0300 Subject: 'onelua' can use the test library Just add -DLUA_USER_H='"ltests.h"' when compiling it. --- lauxlib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lauxlib.c') diff --git a/lauxlib.c b/lauxlib.c index 7f33f0ad..adb3851e 100644 --- a/lauxlib.c +++ b/lauxlib.c @@ -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); -- cgit v1.2.3-55-g6feb