diff options
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | docs/index.html | 2 | ||||
-rw-r--r-- | lanes-3.16.3-0.rockspec (renamed from lanes-3.16.2-0.rockspec) | 6 | ||||
-rw-r--r-- | src/lanes.c | 21 | ||||
-rw-r--r-- | src/lanes.h | 2 |
5 files changed, 25 insertions, 10 deletions
@@ -1,5 +1,9 @@ | |||
1 | CHANGES: | 1 | CHANGES: |
2 | 2 | ||
3 | CHANGE 158: BGe 22-Feb-24 | ||
4 | * naive luajit detection in PUC-Lua-based builds to detect mismatches (don't run ) | ||
5 | * internal version bumped to 3.16.3 | ||
6 | |||
3 | CHANGE 157: Mitalie 17-Aug-23 | 7 | CHANGE 157: Mitalie 17-Aug-23 |
4 | * Prevent crash on linux as non-root | 8 | * Prevent crash on linux as non-root |
5 | * internal version bumped to 3.16.2 | 9 | * internal version bumped to 3.16.2 |
diff --git a/docs/index.html b/docs/index.html index bca8340..3fd77dc 100644 --- a/docs/index.html +++ b/docs/index.html | |||
@@ -70,7 +70,7 @@ | |||
70 | </p> | 70 | </p> |
71 | 71 | ||
72 | <p> | 72 | <p> |
73 | This document was revised on 17-Aug-23, and applies to version <tt>3.16.2</tt>. | 73 | This document was revised on 22-Feb-24, and applies to version <tt>3.16.3</tt>. |
74 | </p> | 74 | </p> |
75 | </font> | 75 | </font> |
76 | </center> | 76 | </center> |
diff --git a/lanes-3.16.2-0.rockspec b/lanes-3.16.3-0.rockspec index 5c4e437..e223a19 100644 --- a/lanes-3.16.2-0.rockspec +++ b/lanes-3.16.3-0.rockspec | |||
@@ -7,11 +7,11 @@ | |||
7 | 7 | ||
8 | package = "Lanes" | 8 | package = "Lanes" |
9 | 9 | ||
10 | version = "3.16.2-0" | 10 | version = "3.16.3-0" |
11 | 11 | ||
12 | source= { | 12 | source= { |
13 | url= "git+https://github.com/LuaLanes/lanes.git", | 13 | url= "git+https://github.com/LuaLanes/lanes.git", |
14 | branch= "v3.16.2" | 14 | branch= "v3.16.3" |
15 | } | 15 | } |
16 | 16 | ||
17 | description = { | 17 | description = { |
@@ -36,7 +36,7 @@ supported_platforms= { "win32", | |||
36 | } | 36 | } |
37 | 37 | ||
38 | dependencies= { | 38 | dependencies= { |
39 | "lua >= 5.1", -- builds with either 5.1, 5.2, 5.3 and 5.4 | 39 | "lua >= 5.1", -- builds with either 5.1/LuaJIT, 5.2, 5.3 and 5.4 |
40 | } | 40 | } |
41 | 41 | ||
42 | build = { | 42 | build = { |
diff --git a/src/lanes.c b/src/lanes.c index d2c95ee..332a1b8 100644 --- a/src/lanes.c +++ b/src/lanes.c | |||
@@ -2083,6 +2083,17 @@ int LANES_API luaopen_lanes_core( lua_State* L) | |||
2083 | STACK_GROW( L, 4); | 2083 | STACK_GROW( L, 4); |
2084 | STACK_CHECK( L, 0); | 2084 | STACK_CHECK( L, 0); |
2085 | 2085 | ||
2086 | // Prevent PUC-Lua/LuaJIT mismatch. Hopefully this works for MoonJIT too | ||
2087 | lua_getglobal( L, "jit"); // {jit?} | ||
2088 | #if LUAJIT_FLAVOR() == 0 | ||
2089 | if (!lua_isnil( L, -1)) | ||
2090 | return luaL_error( L, "Lanes is built for PUC-Lua, don't run from LuaJIT"); | ||
2091 | #else | ||
2092 | if (lua_isnil( L, -1)) | ||
2093 | return luaL_error( L, "Lanes is built for LuaJIT, don't run from PUC-Lua"); | ||
2094 | #endif | ||
2095 | lua_pop( L, 1); // | ||
2096 | |||
2086 | // Create main module interface table | 2097 | // Create main module interface table |
2087 | // we only have 1 closure, which must be called to configure Lanes | 2098 | // we only have 1 closure, which must be called to configure Lanes |
2088 | lua_newtable( L); // M | 2099 | lua_newtable( L); // M |
@@ -2092,15 +2103,15 @@ int LANES_API luaopen_lanes_core( lua_State* L) | |||
2092 | REGISTRY_GET( L, CONFIG_REGKEY); // M LG_configure() settings | 2103 | REGISTRY_GET( L, CONFIG_REGKEY); // M LG_configure() settings |
2093 | if( !lua_isnil( L, -1)) // this is not the first require "lanes.core": call configure() immediately | 2104 | if( !lua_isnil( L, -1)) // this is not the first require "lanes.core": call configure() immediately |
2094 | { | 2105 | { |
2095 | lua_pushvalue( L, -1); // M LG_configure() settings settings | 2106 | lua_pushvalue( L, -1); // M LG_configure() settings settings |
2096 | lua_setfield( L, -4, "settings"); // M LG_configure() settings | 2107 | lua_setfield( L, -4, "settings"); // M LG_configure() settings |
2097 | lua_call( L, 1, 0); // M | 2108 | lua_call( L, 1, 0); // M |
2098 | } | 2109 | } |
2099 | else | 2110 | else |
2100 | { | 2111 | { |
2101 | // will do nothing on first invocation, as we haven't stored settings in the registry yet | 2112 | // will do nothing on first invocation, as we haven't stored settings in the registry yet |
2102 | lua_setfield( L, -3, "settings"); // M LG_configure() | 2113 | lua_setfield( L, -3, "settings"); // M LG_configure() |
2103 | lua_setfield( L, -2, "configure"); // M | 2114 | lua_setfield( L, -2, "configure"); // M |
2104 | } | 2115 | } |
2105 | 2116 | ||
2106 | STACK_END( L, 1); | 2117 | STACK_END( L, 1); |
diff --git a/src/lanes.h b/src/lanes.h index b9245f3..7e1a2e5 100644 --- a/src/lanes.h +++ b/src/lanes.h | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #define LANES_VERSION_MAJOR 3 | 13 | #define LANES_VERSION_MAJOR 3 |
14 | #define LANES_VERSION_MINOR 16 | 14 | #define LANES_VERSION_MINOR 16 |
15 | #define LANES_VERSION_PATCH 2 | 15 | #define LANES_VERSION_PATCH 3 |
16 | 16 | ||
17 | #define LANES_MIN_VERSION_REQUIRED(MAJOR, MINOR, PATCH) ((LANES_VERSION_MAJOR>MAJOR) || (LANES_VERSION_MAJOR==MAJOR && (LANES_VERSION_MINOR>MINOR || (LANES_VERSION_MINOR==MINOR && LANES_VERSION_PATCH>=PATCH)))) | 17 | #define LANES_MIN_VERSION_REQUIRED(MAJOR, MINOR, PATCH) ((LANES_VERSION_MAJOR>MAJOR) || (LANES_VERSION_MAJOR==MAJOR && (LANES_VERSION_MINOR>MINOR || (LANES_VERSION_MINOR==MINOR && LANES_VERSION_PATCH>=PATCH)))) |
18 | #define LANES_VERSION_LESS_THAN(MAJOR, MINOR, PATCH) ((LANES_VERSION_MAJOR<MAJOR) || (LANES_VERSION_MAJOR==MAJOR && (LANES_VERSION_MINOR<MINOR || (LANES_VERSION_MINOR==MINOR && LANES_VERSION_PATCH<PATCH)))) | 18 | #define LANES_VERSION_LESS_THAN(MAJOR, MINOR, PATCH) ((LANES_VERSION_MAJOR<MAJOR) || (LANES_VERSION_MAJOR==MAJOR && (LANES_VERSION_MINOR<MINOR || (LANES_VERSION_MINOR==MINOR && LANES_VERSION_PATCH<PATCH)))) |