Lua 5.3 Reference Manual

by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes

Copyright © 2015–2018 Lua.org, PUC-Rio. Freely available under the terms of the Lua license.

Incompatibilities with the Previous Version

QSC Note: We have compiled the Lua 5.3 environment (contained in the Q-SYS 5.3 and higher releases) with Lua 5.2 compatibility enabled (FYI, Lua v5.2 was used in Q-SYS versions v4.0 - v5.2). Therefore, any previous Lua scripts written in the Q-SYS Script v2 environments should continue to function under Lua 5.3. However, newly written scripts should use the latest Lua 5.3 methods and libraries to avoid any future incompatibilities. Pay special attention to language in this section related to syntax and methods being 'depreciated.' In Q-Sys 5.3 and above, depreciated Lua 5.2 functions will continue to work, but may not be able to function if we later upgrade to a newer version of Lua.

Here we list the incompatibilities that you may find when moving a program from Lua 5.2 to Lua 5.3. You can avoid some incompatibilities by compiling Lua with appropriate options (see file luaconf.h). However, all these compatibility options will be removed in the future.

Lua versions can always change the C API in ways that do not imply source-code changes in a program, such as the numeric values for constants or the implementation of functions as macros. Therefore, you should not assume that binaries are compatible between different Lua versions. Always recompile clients of the Lua API when using a new version.

Similarly, Lua versions can always change the internal representation of precompiled chunks; precompiled chunks are not compatible between different Lua versions.

The standard paths in the official distribution may change between versions.

1 – Changes in the Language

2 – Changes in the Libraries