From 1ab3208a1fceb12fca8f24ba57d6e13c5bff15e3 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 13 Jun 2024 15:13:52 -0300 Subject: 'lua.h' back to redundancy in version definitions Several tools inspect 'lua.h' to extract version information, and they assume the file will have some specific format. --- lua.h | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) (limited to 'lua.h') diff --git a/lua.h b/lua.h index 41a4bf8c..f050dac0 100644 --- a/lua.h +++ b/lua.h @@ -1,7 +1,7 @@ /* ** $Id: lua.h $ ** Lua - A Scripting Language -** Lua.org, PUC-Rio, Brazil (www.lua.org) +** Lua.org, PUC-Rio, Brazil (http://www.lua.org) ** See Copyright Notice at the end of this file */ @@ -13,19 +13,20 @@ #include -#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2024 Lua.org, PUC-Rio" -#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes" - +#include "luaconf.h" -#define LUA_VERSION_MAJOR_N 5 -#define LUA_VERSION_MINOR_N 4 -#define LUA_VERSION_RELEASE_N 7 -#define LUA_VERSION_NUM (LUA_VERSION_MAJOR_N * 100 + LUA_VERSION_MINOR_N) -#define LUA_VERSION_RELEASE_NUM (LUA_VERSION_NUM * 100 + LUA_VERSION_RELEASE_N) +#define LUA_VERSION_MAJOR "5" +#define LUA_VERSION_MINOR "4" +#define LUA_VERSION_RELEASE "7" +#define LUA_VERSION_NUM 504 +#define LUA_VERSION_RELEASE_NUM (LUA_VERSION_NUM * 100 + 7) -#include "luaconf.h" +#define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR +#define LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE +#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2024 Lua.org, PUC-Rio" +#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes" /* mark for precompiled code ('Lua') */ @@ -495,17 +496,6 @@ struct lua_Debug { /* }====================================================================== */ -#define LUAI_TOSTRAUX(x) #x -#define LUAI_TOSTR(x) LUAI_TOSTRAUX(x) - -#define LUA_VERSION_MAJOR LUAI_TOSTR(LUA_VERSION_MAJOR_N) -#define LUA_VERSION_MINOR LUAI_TOSTR(LUA_VERSION_MINOR_N) -#define LUA_VERSION_RELEASE LUAI_TOSTR(LUA_VERSION_RELEASE_N) - -#define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR -#define LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE - - /****************************************************************************** * Copyright (C) 1994-2024 Lua.org, PUC-Rio. * -- cgit v1.2.3-55-g6feb