Skip to content

Commit 9c6f75a

Browse files
authored
Update version checks for Lua 5.5
1 parent 1411206 commit 9c6f75a

3 files changed

Lines changed: 25 additions & 5 deletions

File tree

c-api/compat-5.3.h

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,12 +395,32 @@ COMPAT53_API void luaL_requiref (lua_State *L, const char *modname,
395395

396396

397397

398+
/* declarations for Lua 5.5 */
399+
#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 505
400+
401+
/*
402+
** Internal assertions for in-house debugging
403+
*/
404+
#if defined LUAI_ASSERT
405+
# undef NDEBUG
406+
# include <assert.h>
407+
# define lua_assert(c) assert(c)
408+
#endif
409+
410+
#if !defined(lua_assert)
411+
# define lua_assert(c) ((void)0)
412+
#endif
413+
414+
#endif /* Lua 5.5 only */
415+
416+
417+
398418
/* other Lua versions */
399-
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 || LUA_VERSION_NUM > 504
419+
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 || LUA_VERSION_NUM > 505
400420

401-
# error "unsupported Lua version (i.e. not Lua 5.1, 5.2, 5.3, or 5.4)"
421+
# error "unsupported Lua version (i.e. not Lua 5.1, 5.2, 5.3, 5.4, or 5.5)"
402422

403-
#endif /* other Lua versions except 5.1, 5.2, 5.3, and 5.4 */
423+
#endif /* other Lua versions except 5.1, 5.2, 5.3, 5.4, and 5.5 */
404424

405425

406426

rockspecs/bit32-scm-1.rockspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ description = {
1414
license = "MIT"
1515
}
1616
dependencies = {
17-
"lua >= 5.1, < 5.5"
17+
"lua >= 5.1, < 5.6"
1818
}
1919
build = {
2020
type = "builtin",

rockspecs/compat53-scm-1.rockspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ description = {
1616
license = "MIT"
1717
}
1818
dependencies = {
19-
"lua >= 5.1, < 5.5",
19+
"lua >= 5.1, < 5.6",
2020
--"struct" -- make Roberto's struct module optional
2121
}
2222
build = {

0 commit comments

Comments
 (0)