diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-06-13 15:13:52 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-06-13 15:13:52 -0300 |
| commit | 1ab3208a1fceb12fca8f24ba57d6e13c5bff15e3 (patch) | |
| tree | e180f4dd1591086c5268a074571aa63c49171c27 | |
| parent | 21ff8de33a5aca9c3c907592b894e4b9ab036d3e (diff) | |
| download | lua-5.4.7.tar.gz lua-5.4.7.tar.bz2 lua-5.4.7.zip | |
'lua.h' back to redundancy in version definitionsv5.4.7
Several tools inspect 'lua.h' to extract version information, and
they assume the file will have some specific format.
| -rw-r--r-- | lua.h | 32 | ||||
| -rw-r--r-- | lundump.h | 2 |
2 files changed, 12 insertions, 22 deletions
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.h $ | 2 | ** $Id: lua.h $ |
| 3 | ** Lua - A Scripting Language | 3 | ** Lua - A Scripting Language |
| 4 | ** Lua.org, PUC-Rio, Brazil (www.lua.org) | 4 | ** Lua.org, PUC-Rio, Brazil (http://www.lua.org) |
| 5 | ** See Copyright Notice at the end of this file | 5 | ** See Copyright Notice at the end of this file |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| @@ -13,19 +13,20 @@ | |||
| 13 | #include <stddef.h> | 13 | #include <stddef.h> |
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | #define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2024 Lua.org, PUC-Rio" | 16 | #include "luaconf.h" |
| 17 | #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes" | ||
| 18 | |||
| 19 | 17 | ||
| 20 | #define LUA_VERSION_MAJOR_N 5 | ||
| 21 | #define LUA_VERSION_MINOR_N 4 | ||
| 22 | #define LUA_VERSION_RELEASE_N 7 | ||
| 23 | 18 | ||
| 24 | #define LUA_VERSION_NUM (LUA_VERSION_MAJOR_N * 100 + LUA_VERSION_MINOR_N) | 19 | #define LUA_VERSION_MAJOR "5" |
| 25 | #define LUA_VERSION_RELEASE_NUM (LUA_VERSION_NUM * 100 + LUA_VERSION_RELEASE_N) | 20 | #define LUA_VERSION_MINOR "4" |
| 21 | #define LUA_VERSION_RELEASE "7" | ||
| 26 | 22 | ||
| 23 | #define LUA_VERSION_NUM 504 | ||
| 24 | #define LUA_VERSION_RELEASE_NUM (LUA_VERSION_NUM * 100 + 7) | ||
| 27 | 25 | ||
| 28 | #include "luaconf.h" | 26 | #define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR |
| 27 | #define LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE | ||
| 28 | #define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2024 Lua.org, PUC-Rio" | ||
| 29 | #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes" | ||
| 29 | 30 | ||
| 30 | 31 | ||
| 31 | /* mark for precompiled code ('<esc>Lua') */ | 32 | /* mark for precompiled code ('<esc>Lua') */ |
| @@ -495,17 +496,6 @@ struct lua_Debug { | |||
| 495 | /* }====================================================================== */ | 496 | /* }====================================================================== */ |
| 496 | 497 | ||
| 497 | 498 | ||
| 498 | #define LUAI_TOSTRAUX(x) #x | ||
| 499 | #define LUAI_TOSTR(x) LUAI_TOSTRAUX(x) | ||
| 500 | |||
| 501 | #define LUA_VERSION_MAJOR LUAI_TOSTR(LUA_VERSION_MAJOR_N) | ||
| 502 | #define LUA_VERSION_MINOR LUAI_TOSTR(LUA_VERSION_MINOR_N) | ||
| 503 | #define LUA_VERSION_RELEASE LUAI_TOSTR(LUA_VERSION_RELEASE_N) | ||
| 504 | |||
| 505 | #define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR | ||
| 506 | #define LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE | ||
| 507 | |||
| 508 | |||
| 509 | /****************************************************************************** | 499 | /****************************************************************************** |
| 510 | * Copyright (C) 1994-2024 Lua.org, PUC-Rio. | 500 | * Copyright (C) 1994-2024 Lua.org, PUC-Rio. |
| 511 | * | 501 | * |
| @@ -21,7 +21,7 @@ | |||
| 21 | /* | 21 | /* |
| 22 | ** Encode major-minor version in one byte, one nibble for each | 22 | ** Encode major-minor version in one byte, one nibble for each |
| 23 | */ | 23 | */ |
| 24 | #define LUAC_VERSION (LUA_VERSION_MAJOR_N*16+LUA_VERSION_MINOR_N) | 24 | #define LUAC_VERSION (((LUA_VERSION_NUM / 100) * 16) + LUA_VERSION_NUM % 100) |
| 25 | 25 | ||
| 26 | #define LUAC_FORMAT 0 /* this is the official format */ | 26 | #define LUAC_FORMAT 0 /* this is the official format */ |
| 27 | 27 | ||
