Fixes support of Lua 5.0 and 5.1, and a compilation warning on Linux
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2005 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
01690f7df1
commit
f7d9cc1a90
@ -145,7 +145,16 @@ do { \
|
|||||||
|
|
||||||
const char * Lua_version(void)
|
const char * Lua_version(void)
|
||||||
{
|
{
|
||||||
return LUA_VERSION_MAJOR "." LUA_VERSION_MINOR;
|
// LUA_RELEASE is only available since 5.2+, with format "Lua x.y.z"
|
||||||
|
// The only version information available since Lua 5.0 is LUA_VERSION,
|
||||||
|
// with the format "Lua x.y"
|
||||||
|
#if defined(LUA_RELEASE)
|
||||||
|
return LUA_RELEASE;
|
||||||
|
#elif defined (LUA_VERSION)
|
||||||
|
return LUA_VERSION;
|
||||||
|
#else
|
||||||
|
return "Unknown";
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Updates the screen colors after a running screen has modified the palette.
|
// Updates the screen colors after a running screen has modified the palette.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user