From aec4504337664ca21910c73045563ac3d0eae8d6 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 4 Jan 2026 10:37:19 -0500 Subject: [PATCH] let build be possible with current (5.5.0) Lua Lua 5.5.0 became the most-current Lua version on December 22, 2025 --- src/nhlua.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/nhlua.c b/src/nhlua.c index b43e4c089..ebf439af9 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -2216,8 +2216,12 @@ nhl_init(nhl_sandbox_info *sbi) /* It would be nice to import EXPECTED from each build system. XXX */ /* And it would be nice to do it only once, but it's cheap. */ #ifndef NHL_VERSION_EXPECTED +#if LUA_VERSION_NUM >= 505 +#define NHL_VERSION_EXPECTED 50500 +#else #define NHL_VERSION_EXPECTED 50406 #endif +#endif #ifdef NHL_SANDBOX if (NHL_VERSION_EXPECTED != LUA_VERSION_RELEASE_NUM) { @@ -2978,7 +2982,11 @@ nhlL_newstate(nhl_sandbox_info *sbi, const char *name) nud->sid = ++gl.lua_sid; } - lua_State *L = lua_newstate(nhl_alloc, nud); + lua_State *L = lua_newstate(nhl_alloc, nud +#if LUA_VERSION_NUM >= 505 + , 0 +#endif + ); if (!L) panic("NULL lua_newstate");