mirror of
https://github.com/lua/lua
synced 2025-02-16 21:23:58 +03:00
'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.
This commit is contained in:
parent
21ff8de33a
commit
1ab3208a1f
36
lua.h
36
lua.h
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lua.h $
|
** $Id: lua.h $
|
||||||
** Lua - A Scripting Language
|
** 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
|
** See Copyright Notice at the end of this file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -13,21 +13,22 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
|
||||||
|
#include "luaconf.h"
|
||||||
|
|
||||||
|
|
||||||
|
#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)
|
||||||
|
|
||||||
|
#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_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2024 Lua.org, PUC-Rio"
|
||||||
#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes"
|
#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes"
|
||||||
|
|
||||||
|
|
||||||
#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)
|
|
||||||
|
|
||||||
|
|
||||||
#include "luaconf.h"
|
|
||||||
|
|
||||||
|
|
||||||
/* mark for precompiled code ('<esc>Lua') */
|
/* mark for precompiled code ('<esc>Lua') */
|
||||||
#define LUA_SIGNATURE "\x1bLua"
|
#define LUA_SIGNATURE "\x1bLua"
|
||||||
|
|
||||||
@ -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.
|
* Copyright (C) 1994-2024 Lua.org, PUC-Rio.
|
||||||
*
|
*
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
/*
|
/*
|
||||||
** Encode major-minor version in one byte, one nibble for each
|
** Encode major-minor version in one byte, one nibble for each
|
||||||
*/
|
*/
|
||||||
#define LUAC_VERSION (LUA_VERSION_MAJOR_N*16+LUA_VERSION_MINOR_N)
|
#define LUAC_VERSION (((LUA_VERSION_NUM / 100) * 16) + LUA_VERSION_NUM % 100)
|
||||||
|
|
||||||
#define LUAC_FORMAT 0 /* this is the official format */
|
#define LUAC_FORMAT 0 /* this is the official format */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user