Skip to content

Commit fafc348

Browse files
committed
support for lua 5.4
1 parent 616d639 commit fafc348

File tree

4 files changed

+60
-4
lines changed

4 files changed

+60
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ See below for full [reference documentation](#documentation) .
2828
* Other Unix variants: could work, but untested, required are:
2929
* gcc atomic builtins or C11 `stdatomic.h`
3030
* `pthread.h` or C11 `threads.h`
31-
* Tested Lua versions: 5.1, 5.2, 5.3, luajit 2.0 & 2.1
31+
* Tested Lua versions: 5.1, 5.2, 5.3, 5.4, luajit 2.0 & 2.1
3232

3333
<!-- ---------------------------------------------------------------------------------------- -->
3434

rockspecs/mtmsg-0.4.1-1.rockspec

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
package = "mtmsg"
2+
version = "0.4.1-1"
3+
local versionNumber = version:gsub("^(.*)-.-$", "%1")
4+
source = {
5+
url = "https://github.com/osch/lua-mtmsg/archive/v"..versionNumber..".zip",
6+
dir = "lua-mtmsg-"..versionNumber,
7+
}
8+
description = {
9+
summary = "Low-level multi-threading message buffers",
10+
homepage = "https://github.com/osch/lua-mtmsg",
11+
license = "MIT/X11",
12+
detailed = [[
13+
Low-level in-memory message buffers for inter-thread communication.
14+
This implementation is independent from the underlying threading library
15+
(e.g. `lanes` or `lua-llthreads2`)
16+
]],
17+
}
18+
dependencies = {
19+
"lua >= 5.1, <= 5.4",
20+
}
21+
build = {
22+
type = "builtin",
23+
platforms = {
24+
unix = {
25+
modules = {
26+
mtmsg = {
27+
libraries = {"pthread"},
28+
}
29+
}
30+
},
31+
windows = {
32+
modules = {
33+
mtmsg = {
34+
libraries = {"kernel32"},
35+
}
36+
}
37+
}
38+
},
39+
modules = {
40+
mtmsg = {
41+
sources = {
42+
"src/main.c",
43+
"src/buffer.c",
44+
"src/listener.c",
45+
"src/writer.c",
46+
"src/reader.c",
47+
"src/serialize.c",
48+
"src/error.c",
49+
"src/util.c",
50+
"src/async_util.c",
51+
"src/mtmsg_compat.c",
52+
},
53+
defines = { "MTMSG_VERSION="..versionNumber },
54+
},
55+
}
56+
}

rockspecs/mtmsg-scm-0.rockspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ description = {
1515
]],
1616
}
1717
dependencies = {
18-
"lua >= 5.1, < 5.4",
18+
"lua >= 5.1, <= 5.4",
1919
}
2020
build = {
2121
type = "builtin",

src/compat-5.3.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,9 @@ COMPAT53_API void luaL_requiref (lua_State *L, const char *modname,
397397

398398

399399
/* other Lua versions */
400-
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 || LUA_VERSION_NUM > 503
400+
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 || LUA_VERSION_NUM > 504
401401

402-
# error "unsupported Lua version (i.e. not Lua 5.1, 5.2, or 5.3)"
402+
# error "unsupported Lua version (i.e. not Lua 5.1, 5.2, 5.3 or 5.4)"
403403

404404
#endif /* other Lua versions except 5.1, 5.2, and 5.3 */
405405

0 commit comments

Comments
 (0)