diff options
author | Benoit Germain <bnt.germain@gmail.com> | 2018-11-26 15:18:17 +0100 |
---|---|---|
committer | Benoit Germain <bnt.germain@gmail.com> | 2018-11-26 15:18:17 +0100 |
commit | 5323d25231d327bfbdf12e1fc077903383bf8739 (patch) | |
tree | 7a5917bc1064794df1592f5fe475e27017bfa211 /src | |
parent | 7809a2c08bd3dbea49af2f19a24346372f219b5b (diff) | |
download | lanes-5323d25231d327bfbdf12e1fc077903383bf8739.tar.gz lanes-5323d25231d327bfbdf12e1fc077903383bf8739.tar.bz2 lanes-5323d25231d327bfbdf12e1fc077903383bf8739.zip |
Lanes version available in public header
Diffstat (limited to 'src')
-rw-r--r-- | src/lanes.c | 7 | ||||
-rw-r--r-- | src/lanes.h | 10 | ||||
-rw-r--r-- | src/lanes.lua | 2 |
3 files changed, 15 insertions, 4 deletions
diff --git a/src/lanes.c b/src/lanes.c index ccb32c0..2ad9bd9 100644 --- a/src/lanes.c +++ b/src/lanes.c | |||
@@ -52,8 +52,6 @@ | |||
52 | * ... | 52 | * ... |
53 | */ | 53 | */ |
54 | 54 | ||
55 | char const* VERSION = "3.13.0"; | ||
56 | |||
57 | /* | 55 | /* |
58 | =============================================================================== | 56 | =============================================================================== |
59 | 57 | ||
@@ -2180,7 +2178,10 @@ LUAG_FUNC( configure) | |||
2180 | lua_pushcclosure( L, LG_require, 1); // settings M lanes.require | 2178 | lua_pushcclosure( L, LG_require, 1); // settings M lanes.require |
2181 | lua_setfield( L, -2, "require"); // settings M | 2179 | lua_setfield( L, -2, "require"); // settings M |
2182 | 2180 | ||
2183 | lua_pushstring(L, VERSION); // settings M VERSION | 2181 | lua_pushfstring( |
2182 | L, "%d.%d.%d" | ||
2183 | , LANES_VERSION_MAJOR, LANES_VERSION_MINOR, LANES_VERSION_PATCH | ||
2184 | ); // settings M VERSION | ||
2184 | lua_setfield( L, -2, "version"); // settings M | 2185 | lua_setfield( L, -2, "version"); // settings M |
2185 | 2186 | ||
2186 | lua_pushinteger(L, THREAD_PRIO_MAX); // settings M THREAD_PRIO_MAX | 2187 | lua_pushinteger(L, THREAD_PRIO_MAX); // settings M THREAD_PRIO_MAX |
diff --git a/src/lanes.h b/src/lanes.h index 23fa711..de60d6d 100644 --- a/src/lanes.h +++ b/src/lanes.h | |||
@@ -10,6 +10,16 @@ | |||
10 | #define LANES_API | 10 | #define LANES_API |
11 | #endif // (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) | 11 | #endif // (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) |
12 | 12 | ||
13 | #define LANES_VERSION_MAJOR 3 | ||
14 | #define LANES_VERSION_MINOR 13 | ||
15 | #define LANES_VERSION_PATCH 0 | ||
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)))) | ||
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)))) | ||
19 | #define LANES_VERSION_LESS_OR_EQUAL(MAJOR, MINOR, PATCH) ((LANES_VERSION_MAJOR<MAJOR) || (LANES_VERSION_MAJOR==MAJOR && (LANES_VERSION_MINOR<MINOR || (LANES_VERSION_MINOR==MINOR && LANES_VERSION_PATCH<=PATCH)))) | ||
20 | #define LANES_VERSION_GREATER_THAN(MAJOR, MINOR, PATCH) ((LANES_VERSION_MAJOR>MAJOR) || (LANES_VERSION_MAJOR==MAJOR && (LANES_VERSION_MINOR>MINOR || (LANES_VERSION_MINOR==MINOR && LANES_VERSION_PATCH>PATCH)))) | ||
21 | #define LANES_VERSION_GREATER_OR_EQUAL(MAJOR, MINOR, PATCH) ((LANES_VERSION_MAJOR>MAJOR) || (LANES_VERSION_MAJOR==MAJOR && (LANES_VERSION_MINOR>MINOR || (LANES_VERSION_MINOR==MINOR && LANES_VERSION_PATCH>=PATCH)))) | ||
22 | |||
13 | extern int LANES_API luaopen_lanes_core( lua_State* L); | 23 | extern int LANES_API luaopen_lanes_core( lua_State* L); |
14 | 24 | ||
15 | // Call this to work with embedded Lanes instead of calling luaopen_lanes_core() | 25 | // Call this to work with embedded Lanes instead of calling luaopen_lanes_core() |
diff --git a/src/lanes.lua b/src/lanes.lua index bc47453..7f2560b 100644 --- a/src/lanes.lua +++ b/src/lanes.lua | |||
@@ -146,7 +146,7 @@ lanes.configure = function( settings_) | |||
146 | author= "Asko Kauppi <akauppi@gmail.com>, Benoit Germain <bnt.germain@gmail.com>", | 146 | author= "Asko Kauppi <akauppi@gmail.com>, Benoit Germain <bnt.germain@gmail.com>", |
147 | description= "Running multiple Lua states in parallel", | 147 | description= "Running multiple Lua states in parallel", |
148 | license= "MIT/X11", | 148 | license= "MIT/X11", |
149 | copyright= "Copyright (c) 2007-10, Asko Kauppi; (c) 2011-17, Benoit Germain", | 149 | copyright= "Copyright (c) 2007-10, Asko Kauppi; (c) 2011-18, Benoit Germain", |
150 | version = assert( core.version) | 150 | version = assert( core.version) |
151 | } | 151 | } |
152 | 152 | ||