lua-users home
lua-l archive

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

On 18/12/2011 13.07, Luiz Henrique de Figueiredo wrote:
On a related note, is it possible to detect reliably at run time which
exact version of Lua a script is being run on, i.e. which release number
and which patch level?

It would be nice for a script to be able to detect that it's being run
on, for example: 5.1.4-patchlevel 3 instead of 5.1.5.

The whole point of minor releases is that this detection cannot be done,
because they are ABI compatible. See

However, it can be done in C if needed.

You mean by patching the source? And what if one hasn't control over the source and cannot recompile? I suppose the only alternative is what Dirk suggested (checking for specific bugs), or am I missing something?

-- Lorenzo