lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I'd like to suggest two very minor changes to the Lua source code to make
life easier for people making compile-time customizations:

1. In 'luaconf.h': At the end of the file instead of / as well as the 'Local
configuration' comment, add:
#if defined(LUA_USERCONFIG_H)
#include LUA_USERCONFIG_H
#endif
This will allow customisations to be made here without editing the
distribution file, making maintenance easier. This is the same technique
already used in 'lua.h'.

2. In 'lua.h': Modify the LUA_VERSION macro definition as follows:
#if defined(LUA_VARIANT)
#define LUA_VERSION LUA_VARIANT "Lua " LUA_VERSION_MAJOR "."
LUA_VERSION_MINOR
#else
#define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR
#endif
This allows prefixing of the _VERSION string to indicate a variation from
'standard' lua. There may be a more elegant way to do this, but you get the
idea.

- John Hind.