lua-users home
lua-l archive

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

On 2018-06-02 07:26 PM, Jonathan Goble wrote:
On Sat, Jun 2, 2018, 5:00 PM Bulat Ziganshin < <>> wrote:

    Hello Sean,

    Thursday, May 31, 2018, 8:39:34 PM, you wrote:

    > standard Lua.  The major differences are how modules are coded
    > changed from Lua 5.1 to 5.2) and 64-bit integer support (Lua 5.3).

    isn't that changed in 5.1? afair, 5.2 main change is _ENV stuff

...which directly impacted the coding of modules by eliminating setfenv() (sp?) and module(), the latter of which was used in almost all pure Lua 5.1 modules. There were also significant breaking changes to the C functions for setting up extension modules, which now force (if compatibility with both 5.1 and 5.2/5.3 is desired) the use of #if/#else/#endif directives to take a different code path for 5.1.

Actually, can't you just build the module tables by hand, as you would in Lua 5.1? You don't get upvalues (because C API upvalues are still a pain), but...