Skip to content

Commit c060ab9

Browse files
authored
Merge pull request #2996 from martinhsv/v2/master
Allow lua version 5.4
2 parents 29dbf82 + e4acb3c commit c060ab9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CHANGES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
DD mmm YYYY - 2.9.x (to be released)
22
-------------------
33

4+
* Allow lua version 5.4
5+
[Issue #2996 - @3eka, @martinhsv]
46
* Configure: do not check for pcre1 if pcre2 requested
57
[Issue #2975 - @zhaoshikui, @martinhsv]
68
* Check return code of apr_procattr_io_set()

apache2/msc_lua.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,12 +429,12 @@ int lua_execute(msc_script *script, char *param, modsec_rec *msr, msre_rule *rul
429429
#else
430430

431431
/* Create new state. */
432-
#if LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503 || LUA_VERSION_NUM == 501
432+
#if LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503 || LUA_VERSION_NUM == 504 || LUA_VERSION_NUM == 501
433433
L = luaL_newstate();
434434
#elif LUA_VERSION_NUM == 500
435435
L = lua_open();
436436
#else
437-
#error We are only tested under Lua 5.0, 5.1, 5.2, or 5.3.
437+
#error We are only tested under Lua 5.0, 5.1, 5.2, 5.3, or 5.4.
438438
#endif
439439
luaL_openlibs(L);
440440

@@ -459,10 +459,10 @@ int lua_execute(msc_script *script, char *param, modsec_rec *msr, msre_rule *rul
459459
/* Register functions. */
460460
#if LUA_VERSION_NUM == 500 || LUA_VERSION_NUM == 501
461461
luaL_register(L, "m", mylib);
462-
#elif LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503
462+
#elif LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503 || LUA_VERSION_NUM == 504
463463
luaL_setfuncs(L, mylib, 0);
464464
#else
465-
#error We are only tested under Lua 5.0, 5.1, 5.2, or 5.3.
465+
#error We are only tested under Lua 5.0, 5.1, 5.2, 5.3, or 5.4.
466466
#endif
467467

468468
lua_setglobal(L, "m");

0 commit comments

Comments
 (0)