From 9c6f75a88db1462ff655dc006588b25d3bc2a5be Mon Sep 17 00:00:00 2001 From: tobil4sk Date: Mon, 16 Mar 2026 15:24:15 +0000 Subject: Update version checks for Lua 5.5 --- c-api/compat-5.3.h | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'c-api') diff --git a/c-api/compat-5.3.h b/c-api/compat-5.3.h index 6f66dad..de6c402 100644 --- a/c-api/compat-5.3.h +++ b/c-api/compat-5.3.h @@ -395,12 +395,32 @@ COMPAT53_API void luaL_requiref (lua_State *L, const char *modname, +/* declarations for Lua 5.5 */ +#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 505 + +/* +** Internal assertions for in-house debugging +*/ +#if defined LUAI_ASSERT +# undef NDEBUG +# include +# define lua_assert(c) assert(c) +#endif + +#if !defined(lua_assert) +# define lua_assert(c) ((void)0) +#endif + +#endif /* Lua 5.5 only */ + + + /* other Lua versions */ -#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 || LUA_VERSION_NUM > 504 +#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 || LUA_VERSION_NUM > 505 -# error "unsupported Lua version (i.e. not Lua 5.1, 5.2, 5.3, or 5.4)" +# error "unsupported Lua version (i.e. not Lua 5.1, 5.2, 5.3, 5.4, or 5.5)" -#endif /* other Lua versions except 5.1, 5.2, 5.3, and 5.4 */ +#endif /* other Lua versions except 5.1, 5.2, 5.3, 5.4, and 5.5 */ -- cgit v1.2.3-55-g6feb