[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.3.5 (rc1) now available
- From: Philipp Janda <siffiejoe@...>
- Date: Thu, 28 Jun 2018 07:45:29 +0200
Am 27.06.2018 um 21:08 schröbte Egor Skriptunoff:
On Tue, Jun 26, 2018 at 2:32 PM, Andrew Gierth wrote:
So a question that comes to mind is this: why is there no sane way for
the host program to detect the Lua minor version either at compile time
int lua_ver = lua_version_release(L);
if (lua_ver >= 50303 && lua_ver < 50305)
luaL_error(L, "Recompile with correct lua version");
Host program should be able to read lua_ident (declared in "lua.h") to
detect Lua release in runtime.
This is a string, not a number.
There is also `LUA_VERSION_RELEASE` which is a `char`, but also
requires runtime dispatch (or maybe not in C++?). That's the one I use
to set certain function pointers during initialization.