aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-06-21 15:04:24 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-06-21 15:04:24 -0300
commitea39042e13645f63713425c05cc9ee4cfdcf0a40 (patch)
tree7e0f5a61931dacced100214e297a697019f8ca24
parent05ec55f16b389a4377adab84efe374437da8dbd2 (diff)
downloadlua-ea39042e13645f63713425c05cc9ee4cfdcf0a40.tar.gz
lua-ea39042e13645f63713425c05cc9ee4cfdcf0a40.tar.bz2
lua-ea39042e13645f63713425c05cc9ee4cfdcf0a40.zip
Removed redundancy in definitions of version/release
String rendering now derived from the numeric original definitions.
-rw-r--r--lua.h32
1 files changed, 21 insertions, 11 deletions
diff --git a/lua.h b/lua.h
index fd16cf80..040cc8e4 100644
--- a/lua.h
+++ b/lua.h
@@ -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 (http://www.lua.org) 4** Lua.org, PUC-Rio, Brazil (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,20 +13,19 @@
13#include <stddef.h> 13#include <stddef.h>
14 14
15 15
16#include "luaconf.h" 16#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2023 Lua.org, PUC-Rio"
17#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes"
17 18
18 19
19#define LUA_VERSION_MAJOR "5" 20#define LUA_VERSION_MAJOR_N 5
20#define LUA_VERSION_MINOR "4" 21#define LUA_VERSION_MINOR_N 4
21#define LUA_VERSION_RELEASE "6" 22#define LUA_VERSION_RELEASE_N 6
22 23
23#define LUA_VERSION_NUM 504 24#define LUA_VERSION_NUM (LUA_VERSION_MAJOR_N * 100 + LUA_VERSION_MINOR_N)
24#define LUA_VERSION_RELEASE_NUM (LUA_VERSION_NUM * 100 + 6) 25#define LUA_VERSION_RELEASE_NUM (LUA_VERSION_NUM * 100 + LUA_VERSION_RELEASE_N)
25 26
26#define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR 27
27#define LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE 28#include "luaconf.h"
28#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2023 Lua.org, PUC-Rio"
29#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes"
30 29
31 30
32/* mark for precompiled code ('<esc>Lua') */ 31/* mark for precompiled code ('<esc>Lua') */
@@ -496,6 +495,17 @@ struct lua_Debug {
496/* }====================================================================== */ 495/* }====================================================================== */
497 496
498 497
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
499/****************************************************************************** 509/******************************************************************************
500* Copyright (C) 1994-2023 Lua.org, PUC-Rio. 510* Copyright (C) 1994-2023 Lua.org, PUC-Rio.
501* 511*