diff -Nru lua-5.4.8/Makefile lua-5.4.9/Makefile --- lua-5.4.8/Makefile 2025-05-21 13:56:52.000000000 -0300 +++ lua-5.4.9/Makefile 2026-08-05 18:06:43.864826307 -0300 @@ -46,7 +46,7 @@ # Lua version and release. V= 5.4 -R= $V.8 +R= $V.9 # Targets start here. all: $(PLAT) diff -Nru lua-5.4.8/README lua-5.4.9/README --- lua-5.4.8/README 2025-05-21 18:12:27.000000000 -0300 +++ lua-5.4.9/README 2026-08-10 06:24:19.311249003 -0300 @@ -1,5 +1,5 @@ -This is Lua 5.4.8, released on 21 May 2025. +This is Lua 5.4.9, released on 10 Aug 2026. For installation instructions, license details, and further information about Lua, see doc/readme.html. Binary files lua-5.4.8/doc/OSIApproved.png and lua-5.4.9/doc/OSIApproved.png differ Binary files lua-5.4.8/doc/OSIApproved_100X125.png and lua-5.4.9/doc/OSIApproved_100X125.png differ diff -Nru lua-5.4.8/doc/contents.html lua-5.4.9/doc/contents.html --- lua-5.4.8/doc/contents.html 2025-05-21 18:11:34.000000000 -0300 +++ lua-5.4.9/doc/contents.html 2026-08-05 21:05:49.588157354 -0300 @@ -10,7 +10,7 @@

-Lua +Lua Lua 5.4 Reference Manual

@@ -32,7 +32,7 @@

-Copyright © 2020–2025 Lua.org, PUC-Rio. +Copyright © 2020–2026 Lua.org, PUC-Rio. Freely available under the terms of the Lua license. @@ -85,7 +85,7 @@

  • 3.4.9 – Table Constructors
  • 3.4.10 – Function Calls
  • 3.4.11 – Function Definitions -
  • 3.4.12 – Lists of expressions, multiple results, and adjustment +
  • 3.4.12 – Lists of expressions, multiple results, and adjustment
  • 3.5 – Visibility Rules @@ -668,10 +668,10 @@ Binary files lua-5.4.8/doc/logo.gif and lua-5.4.9/doc/logo.gif differ Binary files lua-5.4.8/doc/logo.png and lua-5.4.9/doc/logo.png differ diff -Nru lua-5.4.8/doc/manual.css lua-5.4.9/doc/manual.css --- lua-5.4.8/doc/manual.css 2015-03-11 10:12:17.000000000 -0300 +++ lua-5.4.9/doc/manual.css 2026-07-23 20:51:30.000000000 -0300 @@ -7,6 +7,10 @@ font-size: 12pt ; } +pre.api { + white-space: normal ; +} + span.apii { color: gray ; float: right ; diff -Nru lua-5.4.8/doc/manual.html lua-5.4.9/doc/manual.html --- lua-5.4.8/doc/manual.html 2025-05-21 18:09:59.000000000 -0300 +++ lua-5.4.9/doc/manual.html 2026-08-07 17:25:46.389398043 -0300 @@ -10,7 +10,7 @@

    -Lua +Lua Lua 5.4 Reference Manual

    @@ -19,7 +19,7 @@

    -Copyright © 2020–2025 Lua.org, PUC-Rio. +Copyright © 2020–2026 Lua.org, PUC-Rio. Freely available under the terms of the Lua license. @@ -166,7 +166,7 @@

    Unless stated otherwise, any overflow when manipulating integer values wrap around, -according to the usual rules of two-complement arithmetic. +according to the usual rules of two's complement arithmetic. (In other words, the actual result is the unique representable integer that is equal modulo 2n to the mathematical result, @@ -747,7 +747,7 @@ will not be accessed again in the normal execution of the program. ("Normal execution" here excludes finalizers, which can resurrect dead objects (see §2.5.3), -and excludes also operations using the debug library.) +and it excludes also operations using the debug library.) Note that the time when the collector can be sure that an object is dead may not coincide with the programmer's expectations. The only guarantees are that Lua will not collect an object @@ -2386,12 +2386,12 @@

    A table with exactly one border is called a sequence. -For instance, the table {10, 20, 30, 40, 50} is a sequence, +For instance, the table {10,20,30,40,50} is a sequence, as it has only one border (5). -The table {10, 20, 30, nil, 50} has two borders (3 and 5), +The table {10,20,30,nil,50} has two borders (3 and 5), and therefore it is not a sequence. (The nil at index 4 is called a hole.) -The table {nil, 20, 30, nil, nil, 60, nil} +The table {nil,20,30,nil,nil,60,nil} has three borders (0, 3, and 6), so it is not a sequence, too. The table {} is a sequence with border 0. @@ -2824,7 +2824,7 @@

    -Here are some examples of uses of mutlres expressions. +Here are some examples of uses of multires expressions. In all cases, when the construction needs "the n-th result" and there is no such result, it uses a nil. @@ -3512,7 +3512,7 @@


    lua_absindex

    [-0, +0, –] -

    int lua_absindex (lua_State *L, int idx);
    +
    int lua_absindex (lua_State *L, int idx);

    Converts the acceptable index idx @@ -3524,7 +3524,7 @@


    lua_Alloc

    -
    typedef void * (*lua_Alloc) (void *ud,
    +
    typedef void * (*lua_Alloc) (void *ud,
                                  void *ptr,
                                  size_t osize,
                                  size_t nsize);
    @@ -3602,7 +3602,7 @@

    lua_arith

    [-(2|1), +1, e] -

    void lua_arith (lua_State *L, int op);
    +
    void lua_arith (lua_State *L, int op);

    Performs an arithmetic or bitwise operation over the two values @@ -3641,7 +3641,7 @@


    lua_atpanic

    [-0, +0, –] -

    lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf);
    +
    lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf);

    Sets a new panic function and returns the old one (see §4.4). @@ -3652,7 +3652,7 @@


    lua_call

    [-(nargs+1), +nresults, e] -

    void lua_call (lua_State *L, int nargs, int nresults);
    +
    void lua_call (lua_State *L, int nargs, int nresults);

    Calls a function. @@ -3717,7 +3717,7 @@


    lua_callk

    [-(nargs + 1), +nresults, e] -

    void lua_callk (lua_State *L,
    +
    void lua_callk (lua_State *L,
                     int nargs,
                     int nresults,
                     lua_KContext ctx,
    @@ -3732,7 +3732,7 @@
     
     
     

    lua_CFunction

    -
    typedef int (*lua_CFunction) (lua_State *L);
    +
    typedef int (*lua_CFunction) (lua_State *L);

    Type for C functions. @@ -3784,7 +3784,7 @@


    lua_checkstack

    [-0, +0, –] -

    int lua_checkstack (lua_State *L, int n);
    +
    int lua_checkstack (lua_State *L, int n);

    Ensures that the stack has space for at least n extra elements, @@ -3804,7 +3804,7 @@


    lua_close

    [-0, +0, –] -

    void lua_close (lua_State *L);
    +
    void lua_close (lua_State *L);

    Close all active to-be-closed variables in the main thread, @@ -3826,7 +3826,7 @@


    lua_closeslot

    [-0, +0, e] -

    void lua_closeslot (lua_State *L, int index);
    +
    void lua_closeslot (lua_State *L, int index);

    Close the to-be-closed slot at the given index and set its value to nil. @@ -3848,7 +3848,7 @@


    lua_closethread

    [-0, +?, –] -

    int lua_closethread (lua_State *L, lua_State *from);
    +
    int lua_closethread (lua_State *L, lua_State *from);

    Resets a thread, cleaning its call stack and closing all pending @@ -3877,7 +3877,7 @@


    lua_compare

    [-0, +0, e] -

    int lua_compare (lua_State *L, int index1, int index2, int op);
    +
    int lua_compare (lua_State *L, int index1, int index2, int op);

    Compares two Lua values. @@ -3905,7 +3905,7 @@


    lua_concat

    [-n, +1, e] -

    void lua_concat (lua_State *L, int n);
    +
    void lua_concat (lua_State *L, int n);

    Concatenates the n values at the top of the stack, @@ -3922,7 +3922,7 @@


    lua_copy

    [-0, +0, –] -

    void lua_copy (lua_State *L, int fromidx, int toidx);
    +
    void lua_copy (lua_State *L, int fromidx, int toidx);

    Copies the element at index fromidx @@ -3936,7 +3936,7 @@


    lua_createtable

    [-0, +1, m] -

    void lua_createtable (lua_State *L, int narr, int nrec);
    +
    void lua_createtable (lua_State *L, int narr, int nrec);

    Creates a new empty table and pushes it onto the stack. @@ -3955,7 +3955,7 @@


    lua_dump

    [-0, +0, –] -

    int lua_dump (lua_State *L,
    +
    int lua_dump (lua_State *L,
                             lua_Writer writer,
                             void *data,
                             int strip);
    @@ -3994,7 +3994,7 @@

    lua_error

    [-1, +0, v] -

    int lua_error (lua_State *L);
    +
    int lua_error (lua_State *L);

    Raises a Lua error, @@ -4009,7 +4009,7 @@


    lua_gc

    [-0, +0, –] -

    int lua_gc (lua_State *L, int what, ...);
    +
    int lua_gc (lua_State *L, int what, ...);

    Controls the garbage collector. @@ -4080,7 +4080,7 @@


    lua_getallocf

    [-0, +0, –] -

    lua_Alloc lua_getallocf (lua_State *L, void **ud);
    +
    lua_Alloc lua_getallocf (lua_State *L, void **ud);

    Returns the memory-allocation function of a given state. @@ -4093,7 +4093,7 @@


    lua_getfield

    [-0, +1, e] -

    int lua_getfield (lua_State *L, int index, const char *k);
    +
    int lua_getfield (lua_State *L, int index, const char *k);

    Pushes onto the stack the value t[k], @@ -4111,7 +4111,7 @@


    lua_getextraspace

    [-0, +0, –] -

    void *lua_getextraspace (lua_State *L);
    +
    void *lua_getextraspace (lua_State *L);

    Returns a pointer to a raw memory area associated with the @@ -4136,7 +4136,7 @@


    lua_getglobal

    [-0, +1, e] -

    int lua_getglobal (lua_State *L, const char *name);
    +
    int lua_getglobal (lua_State *L, const char *name);

    Pushes onto the stack the value of the global name. @@ -4148,7 +4148,7 @@


    lua_geti

    [-0, +1, e] -

    int lua_geti (lua_State *L, int index, lua_Integer i);
    +
    int lua_geti (lua_State *L, int index, lua_Integer i);

    Pushes onto the stack the value t[i], @@ -4166,7 +4166,7 @@


    lua_getmetatable

    [-0, +(0|1), –] -

    int lua_getmetatable (lua_State *L, int index);
    +
    int lua_getmetatable (lua_State *L, int index);

    If the value at the given index has a metatable, @@ -4180,7 +4180,7 @@


    lua_gettable

    [-1, +1, e] -

    int lua_gettable (lua_State *L, int index);
    +
    int lua_gettable (lua_State *L, int index);

    Pushes onto the stack the value t[k], @@ -4204,7 +4204,7 @@


    lua_gettop

    [-0, +0, –] -

    int lua_gettop (lua_State *L);
    +
    int lua_gettop (lua_State *L);

    Returns the index of the top element in the stack. @@ -4218,7 +4218,7 @@


    lua_getiuservalue

    [-0, +1, –] -

    int lua_getiuservalue (lua_State *L, int index, int n);
    +
    int lua_getiuservalue (lua_State *L, int index, int n);

    Pushes onto the stack the n-th user value associated with the @@ -4236,7 +4236,7 @@


    lua_insert

    [-1, +1, –] -

    void lua_insert (lua_State *L, int index);
    +
    void lua_insert (lua_State *L, int index);

    Moves the top element into the given valid index, @@ -4249,7 +4249,7 @@


    lua_Integer

    -
    typedef ... lua_Integer;
    +
    typedef ... lua_Integer;

    The type of integers in Lua. @@ -4257,9 +4257,9 @@

    By default this type is long long, -(usually a 64-bit two-complement integer), +(usually a 64-bit two's complement integer), but that can be changed to long or int -(usually a 32-bit two-complement integer). +(usually a 32-bit two's complement integer). (See LUA_INT_TYPE in luaconf.h.) @@ -4274,7 +4274,7 @@


    lua_isboolean

    [-0, +0, –] -

    int lua_isboolean (lua_State *L, int index);
    +
    int lua_isboolean (lua_State *L, int index);

    Returns 1 if the value at the given index is a boolean, @@ -4286,7 +4286,7 @@


    lua_iscfunction

    [-0, +0, –] -

    int lua_iscfunction (lua_State *L, int index);
    +
    int lua_iscfunction (lua_State *L, int index);

    Returns 1 if the value at the given index is a C function, @@ -4298,7 +4298,7 @@


    lua_isfunction

    [-0, +0, –] -

    int lua_isfunction (lua_State *L, int index);
    +
    int lua_isfunction (lua_State *L, int index);

    Returns 1 if the value at the given index is a function @@ -4310,7 +4310,7 @@


    lua_isinteger

    [-0, +0, –] -

    int lua_isinteger (lua_State *L, int index);
    +
    int lua_isinteger (lua_State *L, int index);

    Returns 1 if the value at the given index is an integer @@ -4323,7 +4323,7 @@


    lua_islightuserdata

    [-0, +0, –] -

    int lua_islightuserdata (lua_State *L, int index);
    +
    int lua_islightuserdata (lua_State *L, int index);

    Returns 1 if the value at the given index is a light userdata, @@ -4335,7 +4335,7 @@


    lua_isnil

    [-0, +0, –] -

    int lua_isnil (lua_State *L, int index);
    +
    int lua_isnil (lua_State *L, int index);

    Returns 1 if the value at the given index is nil, @@ -4347,7 +4347,7 @@


    lua_isnone

    [-0, +0, –] -

    int lua_isnone (lua_State *L, int index);
    +
    int lua_isnone (lua_State *L, int index);

    Returns 1 if the given index is not valid, @@ -4359,7 +4359,7 @@


    lua_isnoneornil

    [-0, +0, –] -

    int lua_isnoneornil (lua_State *L, int index);
    +
    int lua_isnoneornil (lua_State *L, int index);

    Returns 1 if the given index is not valid @@ -4372,7 +4372,7 @@


    lua_isnumber

    [-0, +0, –] -

    int lua_isnumber (lua_State *L, int index);
    +
    int lua_isnumber (lua_State *L, int index);

    Returns 1 if the value at the given index is a number @@ -4385,7 +4385,7 @@


    lua_isstring

    [-0, +0, –] -

    int lua_isstring (lua_State *L, int index);
    +
    int lua_isstring (lua_State *L, int index);

    Returns 1 if the value at the given index is a string @@ -4398,7 +4398,7 @@


    lua_istable

    [-0, +0, –] -

    int lua_istable (lua_State *L, int index);
    +
    int lua_istable (lua_State *L, int index);

    Returns 1 if the value at the given index is a table, @@ -4410,7 +4410,7 @@


    lua_isthread

    [-0, +0, –] -

    int lua_isthread (lua_State *L, int index);
    +
    int lua_isthread (lua_State *L, int index);

    Returns 1 if the value at the given index is a thread, @@ -4422,7 +4422,7 @@


    lua_isuserdata

    [-0, +0, –] -

    int lua_isuserdata (lua_State *L, int index);
    +
    int lua_isuserdata (lua_State *L, int index);

    Returns 1 if the value at the given index is a userdata @@ -4434,7 +4434,7 @@


    lua_isyieldable

    [-0, +0, –] -

    int lua_isyieldable (lua_State *L);
    +
    int lua_isyieldable (lua_State *L);

    Returns 1 if the given coroutine can yield, @@ -4445,7 +4445,7 @@


    lua_KContext

    -
    typedef ... lua_KContext;
    +
    typedef ... lua_KContext;

    The type for continuation-function contexts. @@ -4460,7 +4460,7 @@


    lua_KFunction

    -
    typedef int (*lua_KFunction) (lua_State *L, int status, lua_KContext ctx);
    +
    typedef int (*lua_KFunction) (lua_State *L, int status, lua_KContext ctx);

    Type for continuation functions (see §4.5). @@ -4471,7 +4471,7 @@


    lua_len

    [-0, +1, e] -

    void lua_len (lua_State *L, int index);
    +
    void lua_len (lua_State *L, int index);

    Returns the length of the value at the given index. @@ -4485,7 +4485,7 @@


    lua_load

    [-0, +1, –] -

    int lua_load (lua_State *L,
    +
    int lua_load (lua_State *L,
                   lua_Reader reader,
                   void *data,
                   const char *chunkname,
    @@ -4545,7 +4545,7 @@
     
     

    lua_newstate

    [-0, +0, –] -

    lua_State *lua_newstate (lua_Alloc f, void *ud);
    +
    lua_State *lua_newstate (lua_Alloc f, void *ud);

    Creates a new independent state and returns its main thread. @@ -4563,11 +4563,11 @@


    lua_newtable

    [-0, +1, m] -

    void lua_newtable (lua_State *L);
    +
    void lua_newtable (lua_State *L);

    Creates a new empty table and pushes it onto the stack. -It is equivalent to lua_createtable(L, 0, 0). +It is equivalent to lua_createtable(L,0,0). @@ -4575,7 +4575,7 @@


    lua_newthread

    [-0, +1, m] -

    lua_State *lua_newthread (lua_State *L);
    +
    lua_State *lua_newthread (lua_State *L);

    Creates a new thread, pushes it on the stack, @@ -4595,7 +4595,7 @@


    lua_newuserdatauv

    [-0, +1, m] -

    void *lua_newuserdatauv (lua_State *L, size_t size, int nuvalue);
    +
    void *lua_newuserdatauv (lua_State *L, size_t size, int nuvalue);

    This function creates and pushes on the stack a new full userdata, @@ -4618,7 +4618,7 @@


    lua_next

    [-1, +(2|0), v] -

    int lua_next (lua_State *L, int index);
    +
    int lua_next (lua_State *L, int index);

    Pops a key from the stack, @@ -4664,7 +4664,7 @@


    lua_Number

    -
    typedef ... lua_Number;
    +
    typedef ... lua_Number;

    The type of floats in Lua. @@ -4680,7 +4680,7 @@


    lua_numbertointeger

    -
    int lua_numbertointeger (lua_Number n, lua_Integer *p);
    +
    int lua_numbertointeger (lua_Number n, lua_Integer *p);

    Tries to convert a Lua float to a Lua integer; @@ -4702,7 +4702,7 @@


    lua_pcall

    [-(nargs + 1), +(nresults|1), –] -

    int lua_pcall (lua_State *L, int nargs, int nresults, int msgh);
    +
    int lua_pcall (lua_State *L, int nargs, int nresults, int msgh);

    Calls a function (or a callable object) in protected mode. @@ -4752,7 +4752,7 @@


    lua_pcallk

    [-(nargs + 1), +(nresults|1), –] -

    int lua_pcallk (lua_State *L,
    +
    int lua_pcallk (lua_State *L,
                     int nargs,
                     int nresults,
                     int msgh,
    @@ -4769,7 +4769,7 @@
     
     

    lua_pop

    [-n, +0, e] -

    void lua_pop (lua_State *L, int n);
    +
    void lua_pop (lua_State *L, int n);

    Pops n elements from the stack. @@ -4781,7 +4781,7 @@


    lua_pushboolean

    [-0, +1, –] -

    void lua_pushboolean (lua_State *L, int b);
    +
    void lua_pushboolean (lua_State *L, int b);

    Pushes a boolean value with value b onto the stack. @@ -4792,7 +4792,7 @@


    lua_pushcclosure

    [-n, +1, m] -

    void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n);
    +
    void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n);

    Pushes a new C closure onto the stack. @@ -4841,7 +4841,7 @@


    lua_pushcfunction

    [-0, +1, –] -

    void lua_pushcfunction (lua_State *L, lua_CFunction f);
    +
    void lua_pushcfunction (lua_State *L, lua_CFunction f);

    Pushes a C function onto the stack. @@ -4853,7 +4853,7 @@


    lua_pushfstring

    [-0, +1, v] -

    const char *lua_pushfstring (lua_State *L, const char *fmt, ...);
    +
    const char *lua_pushfstring (lua_State *L, const char *fmt, ...);

    Pushes onto the stack a formatted string @@ -4888,7 +4888,7 @@


    lua_pushglobaltable

    [-0, +1, –] -

    void lua_pushglobaltable (lua_State *L);
    +
    void lua_pushglobaltable (lua_State *L);

    Pushes the global environment onto the stack. @@ -4899,7 +4899,7 @@


    lua_pushinteger

    [-0, +1, –] -

    void lua_pushinteger (lua_State *L, lua_Integer n);
    +
    void lua_pushinteger (lua_State *L, lua_Integer n);

    Pushes an integer with value n onto the stack. @@ -4910,7 +4910,7 @@


    lua_pushlightuserdata

    [-0, +1, –] -

    void lua_pushlightuserdata (lua_State *L, void *p);
    +
    void lua_pushlightuserdata (lua_State *L, void *p);

    Pushes a light userdata onto the stack. @@ -4931,7 +4931,7 @@


    lua_pushliteral

    [-0, +1, m] -

    const char *lua_pushliteral (lua_State *L, const char *s);
    +
    const char *lua_pushliteral (lua_State *L, const char *s);

    This macro is equivalent to lua_pushstring, @@ -4944,7 +4944,7 @@


    lua_pushlstring

    [-0, +1, m] -

    const char *lua_pushlstring (lua_State *L, const char *s, size_t len);
    +
    const char *lua_pushlstring (lua_State *L, const char *s, size_t len);

    Pushes the string pointed to by s with size len @@ -4965,7 +4965,7 @@


    lua_pushnil

    [-0, +1, –] -

    void lua_pushnil (lua_State *L);
    +
    void lua_pushnil (lua_State *L);

    Pushes a nil value onto the stack. @@ -4976,7 +4976,7 @@


    lua_pushnumber

    [-0, +1, –] -

    void lua_pushnumber (lua_State *L, lua_Number n);
    +
    void lua_pushnumber (lua_State *L, lua_Number n);

    Pushes a float with value n onto the stack. @@ -4987,7 +4987,7 @@


    lua_pushstring

    [-0, +1, m] -

    const char *lua_pushstring (lua_State *L, const char *s);
    +
    const char *lua_pushstring (lua_State *L, const char *s);

    Pushes the zero-terminated string pointed to by s @@ -5010,7 +5010,7 @@


    lua_pushthread

    [-0, +1, –] -

    int lua_pushthread (lua_State *L);
    +
    int lua_pushthread (lua_State *L);

    Pushes the thread represented by L onto the stack. @@ -5022,7 +5022,7 @@


    lua_pushvalue

    [-0, +1, –] -

    void lua_pushvalue (lua_State *L, int index);
    +
    void lua_pushvalue (lua_State *L, int index);

    Pushes a copy of the element at the given index @@ -5034,7 +5034,7 @@


    lua_pushvfstring

    [-0, +1, v] -

    const char *lua_pushvfstring (lua_State *L,
    +
    const char *lua_pushvfstring (lua_State *L,
                                   const char *fmt,
                                   va_list argp);
    @@ -5048,7 +5048,7 @@

    lua_rawequal

    [-0, +0, –] -

    int lua_rawequal (lua_State *L, int index1, int index2);
    +
    int lua_rawequal (lua_State *L, int index1, int index2);

    Returns 1 if the two values in indices index1 and @@ -5063,7 +5063,7 @@


    lua_rawget

    [-1, +1, –] -

    int lua_rawget (lua_State *L, int index);
    +
    int lua_rawget (lua_State *L, int index);

    Similar to lua_gettable, but does a raw access @@ -5076,7 +5076,7 @@


    lua_rawgeti

    [-0, +1, –] -

    int lua_rawgeti (lua_State *L, int index, lua_Integer n);
    +
    int lua_rawgeti (lua_State *L, int index, lua_Integer n);

    Pushes onto the stack the value t[n], @@ -5094,7 +5094,7 @@


    lua_rawgetp

    [-0, +1, –] -

    int lua_rawgetp (lua_State *L, int index, const void *p);
    +
    int lua_rawgetp (lua_State *L, int index, const void *p);

    Pushes onto the stack the value t[k], @@ -5113,7 +5113,7 @@


    lua_rawlen

    [-0, +0, –] -

    lua_Unsigned lua_rawlen (lua_State *L, int index);
    +
    lua_Unsigned lua_rawlen (lua_State *L, int index);

    Returns the raw "length" of the value at the given index: @@ -5130,7 +5130,7 @@


    lua_rawset

    [-2, +0, m] -

    void lua_rawset (lua_State *L, int index);
    +
    void lua_rawset (lua_State *L, int index);

    Similar to lua_settable, but does a raw assignment @@ -5143,7 +5143,7 @@


    lua_rawseti

    [-1, +0, m] -

    void lua_rawseti (lua_State *L, int index, lua_Integer i);
    +
    void lua_rawseti (lua_State *L, int index, lua_Integer i);

    Does the equivalent of t[i] = v, @@ -5162,7 +5162,7 @@


    lua_rawsetp

    [-1, +0, m] -

    void lua_rawsetp (lua_State *L, int index, const void *p);
    +
    void lua_rawsetp (lua_State *L, int index, const void *p);

    Does the equivalent of t[p] = v, @@ -5181,7 +5181,7 @@


    lua_Reader

    -
    typedef const char * (*lua_Reader) (lua_State *L,
    +
    typedef const char * (*lua_Reader) (lua_State *L,
                                         void *data,
                                         size_t *size);
    @@ -5204,7 +5204,7 @@

    lua_register

    [-0, +0, e] -

    void lua_register (lua_State *L, const char *name, lua_CFunction f);
    +
    void lua_register (lua_State *L, const char *name, lua_CFunction f);

    Sets the C function f as the new value of global name. @@ -5220,7 +5220,7 @@


    lua_remove

    [-1, +0, –] -

    void lua_remove (lua_State *L, int index);
    +
    void lua_remove (lua_State *L, int index);

    Removes the element at the given valid index, @@ -5234,7 +5234,7 @@


    lua_replace

    [-1, +0, –] -

    void lua_replace (lua_State *L, int index);
    +
    void lua_replace (lua_State *L, int index);

    Moves the top element into the given valid index @@ -5248,7 +5248,7 @@


    lua_resetthread

    [-0, +?, –] -

    int lua_resetthread (lua_State *L);
    +
    int lua_resetthread (lua_State *L);

    This function is deprecated; @@ -5261,7 +5261,7 @@


    lua_resume

    [-?, +?, –] -

    int lua_resume (lua_State *L, lua_State *from, int nargs,
    +
    int lua_resume (lua_State *L, lua_State *from, int nargs,
                               int *nresults);

    @@ -5307,7 +5307,7 @@


    lua_rotate

    [-0, +0, –] -

    void lua_rotate (lua_State *L, int idx, int n);
    +
    void lua_rotate (lua_State *L, int idx, int n);

    Rotates the stack elements between the valid index idx @@ -5327,7 +5327,7 @@


    lua_setallocf

    [-0, +0, –] -

    void lua_setallocf (lua_State *L, lua_Alloc f, void *ud);
    +
    void lua_setallocf (lua_State *L, lua_Alloc f, void *ud);

    Changes the allocator function of a given state to f @@ -5339,7 +5339,7 @@


    lua_setfield

    [-1, +0, e] -

    void lua_setfield (lua_State *L, int index, const char *k);
    +
    void lua_setfield (lua_State *L, int index, const char *k);

    Does the equivalent to t[k] = v, @@ -5358,7 +5358,7 @@


    lua_setglobal

    [-1, +0, e] -

    void lua_setglobal (lua_State *L, const char *name);
    +
    void lua_setglobal (lua_State *L, const char *name);

    Pops a value from the stack and @@ -5370,7 +5370,7 @@


    lua_seti

    [-1, +0, e] -

    void lua_seti (lua_State *L, int index, lua_Integer n);
    +
    void lua_seti (lua_State *L, int index, lua_Integer n);

    Does the equivalent to t[n] = v, @@ -5389,7 +5389,7 @@


    lua_setiuservalue

    [-1, +0, –] -

    int lua_setiuservalue (lua_State *L, int index, int n);
    +
    int lua_setiuservalue (lua_State *L, int index, int n);

    Pops a value from the stack and sets it as @@ -5403,7 +5403,7 @@


    lua_setmetatable

    [-1, +0, –] -

    int lua_setmetatable (lua_State *L, int index);
    +
    int lua_setmetatable (lua_State *L, int index);

    Pops a table or nil from the stack and @@ -5421,7 +5421,7 @@


    lua_settable

    [-2, +0, e] -

    void lua_settable (lua_State *L, int index);
    +
    void lua_settable (lua_State *L, int index);

    Does the equivalent to t[k] = v, @@ -5441,7 +5441,7 @@


    lua_settop

    [-?, +?, e] -

    void lua_settop (lua_State *L, int index);
    +
    void lua_settop (lua_State *L, int index);

    Accepts any index, or 0, @@ -5461,7 +5461,7 @@


    lua_setwarnf

    [-0, +0, –] -

    void lua_setwarnf (lua_State *L, lua_WarnFunction f, void *ud);
    +
    void lua_setwarnf (lua_State *L, lua_WarnFunction f, void *ud);

    Sets the warning function to be used by Lua to emit warnings @@ -5474,7 +5474,7 @@


    lua_State

    -
    typedef struct lua_State lua_State;
    +
    typedef struct lua_State lua_State;

    An opaque structure that points to a thread and indirectly @@ -5495,7 +5495,7 @@


    lua_status

    [-0, +0, –] -

    int lua_status (lua_State *L);
    +
    int lua_status (lua_State *L);

    Returns the status of the thread L. @@ -5520,7 +5520,7 @@


    lua_stringtonumber

    [-0, +1, –] -

    size_t lua_stringtonumber (lua_State *L, const char *s);
    +
    size_t lua_stringtonumber (lua_State *L, const char *s);

    Converts the zero-terminated string s to a number, @@ -5541,7 +5541,7 @@


    lua_toboolean

    [-0, +0, –] -

    int lua_toboolean (lua_State *L, int index);
    +
    int lua_toboolean (lua_State *L, int index);

    Converts the Lua value at the given index to a C boolean @@ -5559,7 +5559,7 @@


    lua_tocfunction

    [-0, +0, –] -

    lua_CFunction lua_tocfunction (lua_State *L, int index);
    +
    lua_CFunction lua_tocfunction (lua_State *L, int index);

    Converts a value at the given index to a C function. @@ -5572,7 +5572,7 @@


    lua_toclose

    [-0, +0, v] -

    void lua_toclose (lua_State *L, int index);
    +
    void lua_toclose (lua_State *L, int index);

    Marks the given index in the stack as a @@ -5614,7 +5614,7 @@


    lua_tointeger

    [-0, +0, –] -

    lua_Integer lua_tointeger (lua_State *L, int index);
    +
    lua_Integer lua_tointeger (lua_State *L, int index);

    Equivalent to lua_tointegerx with isnum equal to NULL. @@ -5625,7 +5625,7 @@


    lua_tointegerx

    [-0, +0, –] -

    lua_Integer lua_tointegerx (lua_State *L, int index, int *isnum);
    +
    lua_Integer lua_tointegerx (lua_State *L, int index, int *isnum);

    Converts the Lua value at the given index @@ -5646,7 +5646,7 @@


    lua_tolstring

    [-0, +0, m] -

    const char *lua_tolstring (lua_State *L, int index, size_t *len);
    +
    const char *lua_tolstring (lua_State *L, int index, size_t *len);

    Converts the Lua value at the given index to a C string. @@ -5680,7 +5680,7 @@


    lua_tonumber

    [-0, +0, –] -

    lua_Number lua_tonumber (lua_State *L, int index);
    +
    lua_Number lua_tonumber (lua_State *L, int index);

    Equivalent to lua_tonumberx with isnum equal to NULL. @@ -5691,7 +5691,7 @@


    lua_tonumberx

    [-0, +0, –] -

    lua_Number lua_tonumberx (lua_State *L, int index, int *isnum);
    +
    lua_Number lua_tonumberx (lua_State *L, int index, int *isnum);

    Converts the Lua value at the given index @@ -5712,7 +5712,7 @@


    lua_topointer

    [-0, +0, –] -

    const void *lua_topointer (lua_State *L, int index);
    +
    const void *lua_topointer (lua_State *L, int index);

    Converts the value at the given index to a generic @@ -5732,7 +5732,7 @@


    lua_tostring

    [-0, +0, m] -

    const char *lua_tostring (lua_State *L, int index);
    +
    const char *lua_tostring (lua_State *L, int index);

    Equivalent to lua_tolstring with len equal to NULL. @@ -5743,7 +5743,7 @@


    lua_tothread

    [-0, +0, –] -

    lua_State *lua_tothread (lua_State *L, int index);
    +
    lua_State *lua_tothread (lua_State *L, int index);

    Converts the value at the given index to a Lua thread @@ -5757,7 +5757,7 @@


    lua_touserdata

    [-0, +0, –] -

    void *lua_touserdata (lua_State *L, int index);
    +
    void *lua_touserdata (lua_State *L, int index);

    If the value at the given index is a full userdata, @@ -5772,7 +5772,7 @@


    lua_type

    [-0, +0, –] -

    int lua_type (lua_State *L, int index);
    +
    int lua_type (lua_State *L, int index);

    Returns the type of the value in the given valid index, @@ -5796,7 +5796,7 @@


    lua_typename

    [-0, +0, –] -

    const char *lua_typename (lua_State *L, int tp);
    +
    const char *lua_typename (lua_State *L, int tp);

    Returns the name of the type encoded by the value tp, @@ -5807,7 +5807,7 @@


    lua_Unsigned

    -
    typedef ... lua_Unsigned;
    +
    typedef ... lua_Unsigned;

    The unsigned version of lua_Integer. @@ -5818,7 +5818,7 @@


    lua_upvalueindex

    [-0, +0, –] -

    int lua_upvalueindex (int i);
    +
    int lua_upvalueindex (int i);

    Returns the pseudo-index that represents the i-th upvalue of @@ -5831,7 +5831,7 @@


    lua_version

    [-0, +0, –] -

    lua_Number lua_version (lua_State *L);
    +
    lua_Number lua_version (lua_State *L);

    Returns the version number of this core. @@ -5841,7 +5841,7 @@


    lua_WarnFunction

    -
    typedef void (*lua_WarnFunction) (void *ud, const char *msg, int tocont);
    +
    typedef void (*lua_WarnFunction) (void *ud, const char *msg, int tocont);

    The type of warning functions, called by Lua to emit warnings. @@ -5862,7 +5862,7 @@


    lua_warning

    [-0, +0, –] -

    void lua_warning (lua_State *L, const char *msg, int tocont);
    +
    void lua_warning (lua_State *L, const char *msg, int tocont);

    Emits a warning with the given message. @@ -5878,7 +5878,7 @@


    lua_Writer

    -
    typedef int (*lua_Writer) (lua_State *L,
    +
    typedef int (*lua_Writer) (lua_State *L,
                                const void* p,
                                size_t sz,
                                void* ud);
    @@ -5904,7 +5904,7 @@

    lua_xmove

    [-?, +?, –] -

    void lua_xmove (lua_State *from, lua_State *to, int n);
    +
    void lua_xmove (lua_State *from, lua_State *to, int n);

    Exchange values between different threads of the same state. @@ -5920,7 +5920,7 @@


    lua_yield

    [-?, +?, v] -

    int lua_yield (lua_State *L, int nresults);
    +
    int lua_yield (lua_State *L, int nresults);

    This function is equivalent to lua_yieldk, @@ -5937,7 +5937,7 @@


    lua_yieldk

    [-?, +?, v] -

    int lua_yieldk (lua_State *L,
    +
    int lua_yieldk (lua_State *L,
                     int nresults,
                     lua_KContext ctx,
                     lua_KFunction k);
    @@ -6009,7 +6009,7 @@

    lua_Debug

    -
    typedef struct lua_Debug {
    +
    typedef struct lua_Debug {
       int event;
       const char *name;           /* (n) */
       const char *namewhat;       /* (n) */
    @@ -6152,7 +6152,7 @@
     
     

    lua_gethook

    [-0, +0, –] -

    lua_Hook lua_gethook (lua_State *L);
    +
    lua_Hook lua_gethook (lua_State *L);

    Returns the current hook function. @@ -6163,7 +6163,7 @@


    lua_gethookcount

    [-0, +0, –] -

    int lua_gethookcount (lua_State *L);
    +
    int lua_gethookcount (lua_State *L);

    Returns the current hook count. @@ -6174,7 +6174,7 @@


    lua_gethookmask

    [-0, +0, –] -

    int lua_gethookmask (lua_State *L);
    +
    int lua_gethookmask (lua_State *L);

    Returns the current hook mask. @@ -6185,7 +6185,7 @@


    lua_getinfo

    [-(0|1), +(0|1|2), m] -

    int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar);
    +
    int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar);

    Gets information about a specific function or function invocation. @@ -6271,7 +6271,7 @@


    lua_getlocal

    [-0, +(0|1), –] -

    const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n);
    +
    const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n);

    Gets information about a local variable or a temporary value @@ -6312,7 +6312,7 @@


    lua_getstack

    [-0, +0, –] -

    int lua_getstack (lua_State *L, int level, lua_Debug *ar);
    +
    int lua_getstack (lua_State *L, int level, lua_Debug *ar);

    Gets information about the interpreter runtime stack. @@ -6335,7 +6335,7 @@


    lua_getupvalue

    [-0, +(0|1), –] -

    const char *lua_getupvalue (lua_State *L, int funcindex, int n);
    +
    const char *lua_getupvalue (lua_State *L, int funcindex, int n);

    Gets information about the n-th upvalue @@ -6354,7 +6354,7 @@


    lua_Hook

    -
    typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar);
    +
    typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar);

    Type for debugging hook functions. @@ -6403,7 +6403,7 @@


    lua_sethook

    [-0, +0, –] -

    void lua_sethook (lua_State *L, lua_Hook f, int mask, int count);
    +
    void lua_sethook (lua_State *L, lua_Hook f, int mask, int count);

    Sets the debugging hook function. @@ -6453,7 +6453,7 @@


    lua_setlocal

    [-(0|1), +0, –] -

    const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n);
    +
    const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n);

    Sets the value of a local variable of a given activation record. @@ -6477,7 +6477,7 @@


    lua_setupvalue

    [-(0|1), +0, –] -

    const char *lua_setupvalue (lua_State *L, int funcindex, int n);
    +
    const char *lua_setupvalue (lua_State *L, int funcindex, int n);

    Sets the value of a closure's upvalue. @@ -6501,7 +6501,7 @@


    lua_upvalueid

    [-0, +0, –] -

    void *lua_upvalueid (lua_State *L, int funcindex, int n);
    +
    void *lua_upvalueid (lua_State *L, int funcindex, int n);

    Returns a unique identifier for the upvalue numbered n @@ -6527,7 +6527,7 @@


    lua_upvaluejoin

    [-0, +0, –] -

    void lua_upvaluejoin (lua_State *L, int funcindex1, int n1,
    +
    void lua_upvaluejoin (lua_State *L, int funcindex1, int n1,
                                         int funcindex2, int n2);

    @@ -6602,7 +6602,7 @@


    luaL_addchar

    [-?, +?, m] -

    void luaL_addchar (luaL_Buffer *B, char c);
    +
    void luaL_addchar (luaL_Buffer *B, char c);

    Adds the byte c to the buffer B @@ -6614,7 +6614,7 @@


    luaL_addgsub

    [-?, +?, m] -

    const void luaL_addgsub (luaL_Buffer *B, const char *s,
    +
    const void luaL_addgsub (luaL_Buffer *B, const char *s,
                              const char *p, const char *r);

    @@ -6628,7 +6628,7 @@


    luaL_addlstring

    [-?, +?, m] -

    void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l);
    +
    void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l);

    Adds the string pointed to by s with length l to @@ -6642,7 +6642,7 @@


    luaL_addsize

    [-?, +?, –] -

    void luaL_addsize (luaL_Buffer *B, size_t n);
    +
    void luaL_addsize (luaL_Buffer *B, size_t n);

    Adds to the buffer B @@ -6655,7 +6655,7 @@


    luaL_addstring

    [-?, +?, m] -

    void luaL_addstring (luaL_Buffer *B, const char *s);
    +
    void luaL_addstring (luaL_Buffer *B, const char *s);

    Adds the zero-terminated string pointed to by s @@ -6668,7 +6668,7 @@


    luaL_addvalue

    [-?, +?, m] -

    void luaL_addvalue (luaL_Buffer *B);
    +
    void luaL_addvalue (luaL_Buffer *B);

    Adds the value on the top of the stack @@ -6688,7 +6688,7 @@


    luaL_argcheck

    [-0, +0, v] -

    void luaL_argcheck (lua_State *L,
    +
    void luaL_argcheck (lua_State *L,
                         int cond,
                         int arg,
                         const char *extramsg);
    @@ -6703,7 +6703,7 @@

    luaL_argerror

    [-0, +0, v] -

    int luaL_argerror (lua_State *L, int arg, const char *extramsg);
    +
    int luaL_argerror (lua_State *L, int arg, const char *extramsg);

    Raises an error reporting a problem with argument arg @@ -6722,7 +6722,7 @@


    luaL_argexpected

    [-0, +0, v] -

    void luaL_argexpected (lua_State *L,
    +
    void luaL_argexpected (lua_State *L,
                            int cond,
                            int arg,
                            const char *tname);
    @@ -6737,7 +6737,7 @@

    luaL_Buffer

    -
    typedef struct luaL_Buffer luaL_Buffer;
    +
    typedef struct luaL_Buffer luaL_Buffer;

    Type for a string buffer. @@ -6809,7 +6809,7 @@


    luaL_buffaddr

    [-0, +0, –] -

    char *luaL_buffaddr (luaL_Buffer *B);
    +
    char *luaL_buffaddr (luaL_Buffer *B);

    Returns the address of the current content of buffer B @@ -6822,7 +6822,7 @@


    luaL_buffinit

    [-0, +?, –] -

    void luaL_buffinit (lua_State *L, luaL_Buffer *B);
    +
    void luaL_buffinit (lua_State *L, luaL_Buffer *B);

    Initializes a buffer B @@ -6836,7 +6836,7 @@


    luaL_bufflen

    [-0, +0, –] -

    size_t luaL_bufflen (luaL_Buffer *B);
    +
    size_t luaL_bufflen (luaL_Buffer *B);

    Returns the length of the current content of buffer B @@ -6848,7 +6848,7 @@


    luaL_buffinitsize

    [-?, +?, m] -

    char *luaL_buffinitsize (lua_State *L, luaL_Buffer *B, size_t sz);
    +
    char *luaL_buffinitsize (lua_State *L, luaL_Buffer *B, size_t sz);

    Equivalent to the sequence @@ -6860,7 +6860,7 @@


    luaL_buffsub

    [-?, +?, –] -

    void luaL_buffsub (luaL_Buffer *B, int n);
    +
    void luaL_buffsub (luaL_Buffer *B, int n);

    Removes n bytes from the buffer B @@ -6873,7 +6873,7 @@


    luaL_callmeta

    [-0, +(0|1), e] -

    int luaL_callmeta (lua_State *L, int obj, const char *e);
    +
    int luaL_callmeta (lua_State *L, int obj, const char *e);

    Calls a metamethod. @@ -6894,7 +6894,7 @@


    luaL_checkany

    [-0, +0, v] -

    void luaL_checkany (lua_State *L, int arg);
    +
    void luaL_checkany (lua_State *L, int arg);

    Checks whether the function has an argument @@ -6906,7 +6906,7 @@


    luaL_checkinteger

    [-0, +0, v] -

    lua_Integer luaL_checkinteger (lua_State *L, int arg);
    +
    lua_Integer luaL_checkinteger (lua_State *L, int arg);

    Checks whether the function argument arg is an integer @@ -6919,7 +6919,7 @@


    luaL_checklstring

    [-0, +0, v] -

    const char *luaL_checklstring (lua_State *L, int arg, size_t *l);
    +
    const char *luaL_checklstring (lua_State *L, int arg, size_t *l);

    Checks whether the function argument arg is a string @@ -6938,7 +6938,7 @@


    luaL_checknumber

    [-0, +0, v] -

    lua_Number luaL_checknumber (lua_State *L, int arg);
    +
    lua_Number luaL_checknumber (lua_State *L, int arg);

    Checks whether the function argument arg is a number @@ -6950,7 +6950,7 @@


    luaL_checkoption

    [-0, +0, v] -

    int luaL_checkoption (lua_State *L,
    +
    int luaL_checkoption (lua_State *L,
                           int arg,
                           const char *def,
                           const char *const lst[]);
    @@ -6981,7 +6981,7 @@

    luaL_checkstack

    [-0, +0, v] -

    void luaL_checkstack (lua_State *L, int sz, const char *msg);
    +
    void luaL_checkstack (lua_State *L, int sz, const char *msg);

    Grows the stack size to top + sz elements, @@ -6995,7 +6995,7 @@


    luaL_checkstring

    [-0, +0, v] -

    const char *luaL_checkstring (lua_State *L, int arg);
    +
    const char *luaL_checkstring (lua_State *L, int arg);

    Checks whether the function argument arg is a string @@ -7012,7 +7012,7 @@


    luaL_checktype

    [-0, +0, v] -

    void luaL_checktype (lua_State *L, int arg, int t);
    +
    void luaL_checktype (lua_State *L, int arg, int t);

    Checks whether the function argument arg has type t. @@ -7024,7 +7024,7 @@


    luaL_checkudata

    [-0, +0, v] -

    void *luaL_checkudata (lua_State *L, int arg, const char *tname);
    +
    void *luaL_checkudata (lua_State *L, int arg, const char *tname);

    Checks whether the function argument arg is a userdata @@ -7037,7 +7037,7 @@


    luaL_checkversion

    [-0, +0, v] -

    void luaL_checkversion (lua_State *L);
    +
    void luaL_checkversion (lua_State *L);

    Checks whether the code making the call and the Lua library being called @@ -7049,7 +7049,7 @@


    luaL_dofile

    [-0, +?, m] -

    int luaL_dofile (lua_State *L, const char *filename);
    +
    int luaL_dofile (lua_State *L, const char *filename);

    Loads and runs the given file. @@ -7067,7 +7067,7 @@


    luaL_dostring

    [-0, +?, –] -

    int luaL_dostring (lua_State *L, const char *str);
    +
    int luaL_dostring (lua_State *L, const char *str);

    Loads and runs the given string. @@ -7085,7 +7085,7 @@


    luaL_error

    [-0, +0, v] -

    int luaL_error (lua_State *L, const char *fmt, ...);
    +
    int luaL_error (lua_State *L, const char *fmt, ...);

    Raises an error. @@ -7108,7 +7108,7 @@


    luaL_execresult

    [-0, +3, m] -

    int luaL_execresult (lua_State *L, int stat);
    +
    int luaL_execresult (lua_State *L, int stat);

    This function produces the return values for @@ -7121,7 +7121,7 @@


    luaL_fileresult

    [-0, +(1|3), m] -

    int luaL_fileresult (lua_State *L, int stat, const char *fname);
    +
    int luaL_fileresult (lua_State *L, int stat, const char *fname);

    This function produces the return values for @@ -7134,7 +7134,7 @@


    luaL_getmetafield

    [-0, +(0|1), m] -

    int luaL_getmetafield (lua_State *L, int obj, const char *e);
    +
    int luaL_getmetafield (lua_State *L, int obj, const char *e);

    Pushes onto the stack the field e from the metatable @@ -7149,7 +7149,7 @@


    luaL_getmetatable

    [-0, +1, m] -

    int luaL_getmetatable (lua_State *L, const char *tname);
    +
    int luaL_getmetatable (lua_State *L, const char *tname);

    Pushes onto the stack the metatable associated with the name tname @@ -7163,7 +7163,7 @@


    luaL_getsubtable

    [-0, +1, e] -

    int luaL_getsubtable (lua_State *L, int idx, const char *fname);
    +
    int luaL_getsubtable (lua_State *L, int idx, const char *fname);

    Ensures that the value t[fname], @@ -7179,7 +7179,7 @@


    luaL_gsub

    [-0, +1, m] -

    const char *luaL_gsub (lua_State *L,
    +
    const char *luaL_gsub (lua_State *L,
                            const char *s,
                            const char *p,
                            const char *r);
    @@ -7196,7 +7196,7 @@

    luaL_len

    [-0, +0, e] -

    lua_Integer luaL_len (lua_State *L, int index);
    +
    lua_Integer luaL_len (lua_State *L, int index);

    Returns the "length" of the value at the given index @@ -7211,7 +7211,7 @@


    luaL_loadbuffer

    [-0, +1, –] -

    int luaL_loadbuffer (lua_State *L,
    +
    int luaL_loadbuffer (lua_State *L,
                          const char *buff,
                          size_t sz,
                          const char *name);
    @@ -7225,7 +7225,7 @@

    luaL_loadbufferx

    [-0, +1, –] -

    int luaL_loadbufferx (lua_State *L,
    +
    int luaL_loadbufferx (lua_State *L,
                           const char *buff,
                           size_t sz,
                           const char *name,
    @@ -7249,7 +7249,7 @@
     
     

    luaL_loadfile

    [-0, +1, m] -

    int luaL_loadfile (lua_State *L, const char *filename);
    +
    int luaL_loadfile (lua_State *L, const char *filename);

    Equivalent to luaL_loadfilex with mode equal to NULL. @@ -7260,7 +7260,7 @@


    luaL_loadfilex

    [-0, +1, m] -

    int luaL_loadfilex (lua_State *L, const char *filename,
    +
    int luaL_loadfilex (lua_State *L, const char *filename,
                                                 const char *mode);

    @@ -7291,7 +7291,7 @@


    luaL_loadstring

    [-0, +1, –] -

    int luaL_loadstring (lua_State *L, const char *s);
    +
    int luaL_loadstring (lua_State *L, const char *s);

    Loads a string as a Lua chunk. @@ -7313,7 +7313,7 @@


    luaL_newlib

    [-0, +1, m] -

    void luaL_newlib (lua_State *L, const luaL_Reg l[]);
    +
    void luaL_newlib (lua_State *L, const luaL_Reg l[]);

    Creates a new table and registers there @@ -7335,7 +7335,7 @@


    luaL_newlibtable

    [-0, +1, m] -

    void luaL_newlibtable (lua_State *L, const luaL_Reg l[]);
    +
    void luaL_newlibtable (lua_State *L, const luaL_Reg l[]);

    Creates a new table with a size optimized @@ -7356,7 +7356,7 @@


    luaL_newmetatable

    [-0, +1, m] -

    int luaL_newmetatable (lua_State *L, const char *tname);
    +
    int luaL_newmetatable (lua_State *L, const char *tname);

    If the registry already has the key tname, @@ -7379,7 +7379,7 @@


    luaL_newstate

    [-0, +0, –] -

    lua_State *luaL_newstate (void);
    +
    lua_State *luaL_newstate (void);

    Creates a new Lua state. @@ -7399,7 +7399,7 @@


    luaL_openlibs

    [-0, +0, e] -

    void luaL_openlibs (lua_State *L);
    +
    void luaL_openlibs (lua_State *L);

    Opens all standard Lua libraries into the given state. @@ -7410,7 +7410,7 @@


    luaL_opt

    [-0, +0, –] -

    T luaL_opt (L, func, arg, dflt);
    +
    T luaL_opt (L, func, arg, dflt);

    This macro is defined as follows: @@ -7431,7 +7431,7 @@


    luaL_optinteger

    [-0, +0, v] -

    lua_Integer luaL_optinteger (lua_State *L,
    +
    lua_Integer luaL_optinteger (lua_State *L,
                                  int arg,
                                  lua_Integer d);
    @@ -7449,7 +7449,7 @@

    luaL_optlstring

    [-0, +0, v] -

    const char *luaL_optlstring (lua_State *L,
    +
    const char *luaL_optlstring (lua_State *L,
                                  int arg,
                                  const char *d,
                                  size_t *l);
    @@ -7480,7 +7480,7 @@

    luaL_optnumber

    [-0, +0, v] -

    lua_Number luaL_optnumber (lua_State *L, int arg, lua_Number d);
    +
    lua_Number luaL_optnumber (lua_State *L, int arg, lua_Number d);

    If the function argument arg is a number, @@ -7495,7 +7495,7 @@


    luaL_optstring

    [-0, +0, v] -

    const char *luaL_optstring (lua_State *L,
    +
    const char *luaL_optstring (lua_State *L,
                                 int arg,
                                 const char *d);
    @@ -7512,7 +7512,7 @@

    luaL_prepbuffer

    [-?, +?, m] -

    char *luaL_prepbuffer (luaL_Buffer *B);
    +
    char *luaL_prepbuffer (luaL_Buffer *B);

    Equivalent to luaL_prepbuffsize @@ -7524,7 +7524,7 @@


    luaL_prepbuffsize

    [-?, +?, m] -

    char *luaL_prepbuffsize (luaL_Buffer *B, size_t sz);
    +
    char *luaL_prepbuffsize (luaL_Buffer *B, size_t sz);

    Returns an address to a space of size sz @@ -7540,7 +7540,7 @@


    luaL_pushfail

    [-0, +1, –] -

    void luaL_pushfail (lua_State *L);
    +
    void luaL_pushfail (lua_State *L);

    Pushes the fail value onto the stack (see §6). @@ -7551,7 +7551,7 @@


    luaL_pushresult

    [-?, +1, m] -

    void luaL_pushresult (luaL_Buffer *B);
    +
    void luaL_pushresult (luaL_Buffer *B);

    Finishes the use of buffer B leaving the final string on @@ -7563,7 +7563,7 @@


    luaL_pushresultsize

    [-?, +1, m] -

    void luaL_pushresultsize (luaL_Buffer *B, size_t sz);
    +
    void luaL_pushresultsize (luaL_Buffer *B, size_t sz);

    Equivalent to the sequence luaL_addsize, luaL_pushresult. @@ -7574,7 +7574,7 @@


    luaL_ref

    [-1, +0, m] -

    int luaL_ref (lua_State *L, int t);
    +
    int luaL_ref (lua_State *L, int t);

    Creates and returns a reference, @@ -7602,7 +7602,7 @@


    luaL_Reg

    -
    typedef struct luaL_Reg {
    +
    typedef struct luaL_Reg {
       const char *name;
       lua_CFunction func;
     } luaL_Reg;
    @@ -7621,7 +7621,7 @@

    luaL_requiref

    [-0, +1, e] -

    void luaL_requiref (lua_State *L, const char *modname,
    +
    void luaL_requiref (lua_State *L, const char *modname,
                         lua_CFunction openf, int glb);

    @@ -7645,7 +7645,7 @@


    luaL_setfuncs

    [-nup, +0, m] -

    void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup);
    +
    void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup);

    Registers all functions in the array l @@ -7672,7 +7672,7 @@


    luaL_setmetatable

    [-0, +0, –] -

    void luaL_setmetatable (lua_State *L, const char *tname);
    +
    void luaL_setmetatable (lua_State *L, const char *tname);

    Sets the metatable of the object on the top of the stack @@ -7684,7 +7684,7 @@


    luaL_Stream

    -
    typedef struct luaL_Stream {
    +
    typedef struct luaL_Stream {
       FILE *f;
       lua_CFunction closef;
     } luaL_Stream;
    @@ -7723,7 +7723,7 @@

    luaL_testudata

    [-0, +0, m] -

    void *luaL_testudata (lua_State *L, int arg, const char *tname);
    +
    void *luaL_testudata (lua_State *L, int arg, const char *tname);

    This function works like luaL_checkudata, @@ -7736,7 +7736,7 @@


    luaL_tolstring

    [-0, +1, e] -

    const char *luaL_tolstring (lua_State *L, int idx, size_t *len);
    +
    const char *luaL_tolstring (lua_State *L, int idx, size_t *len);

    Converts any Lua value at the given index to a C string @@ -7759,7 +7759,7 @@


    luaL_traceback

    [-0, +1, m] -

    void luaL_traceback (lua_State *L, lua_State *L1, const char *msg,
    +
    void luaL_traceback (lua_State *L, lua_State *L1, const char *msg,
                          int level);

    @@ -7775,7 +7775,7 @@


    luaL_typeerror

    [-0, +0, v] -

    int luaL_typeerror (lua_State *L, int arg, const char *tname);
    +
    int luaL_typeerror (lua_State *L, int arg, const char *tname);

    Raises a type error for the argument arg @@ -7790,7 +7790,7 @@


    luaL_typename

    [-0, +0, –] -

    const char *luaL_typename (lua_State *L, int index);
    +
    const char *luaL_typename (lua_State *L, int index);

    Returns the name of the type of the value at the given index. @@ -7801,7 +7801,7 @@


    luaL_unref

    [-0, +0, –] -

    void luaL_unref (lua_State *L, int t, int ref);
    +
    void luaL_unref (lua_State *L, int t, int ref);

    Releases the reference ref from the table at index t @@ -7821,7 +7821,7 @@


    luaL_where

    [-0, +1, m] -

    void luaL_where (lua_State *L, int lvl);
    +
    void luaL_where (lua_State *L, int lvl);

    Pushes onto the stack a string identifying the current position @@ -12050,10 +12050,10 @@

    diff -Nru lua-5.4.8/doc/readme.html lua-5.4.9/doc/readme.html --- lua-5.4.8/doc/readme.html 2025-05-21 18:12:02.000000000 -0300 +++ lua-5.4.9/doc/readme.html 2026-08-05 18:42:46.708904098 -0300 @@ -29,7 +29,7 @@

    -Lua +Lua Welcome to Lua 5.4

    @@ -86,8 +86,8 @@ You need to build it before using it. Building Lua should be straightforward because -Lua is implemented in pure ANSI C and compiles unmodified in all known -platforms that have an ANSI C compiler. +Lua is implemented in pure ISO C and compiles unmodified in all known +platforms that have an ISO C compiler. Lua also compiles unmodified as C++. The instructions given below for building Lua are for Unix-like platforms, such as Linux and macOS. @@ -109,7 +109,7 @@
    1. Open a terminal window and move to -the top-level directory, which is named lua-5.4.8. +the top-level directory, which is named lua-5.4.9. The Makefile there controls both the build process and the installation process.

    2. @@ -287,7 +287,7 @@

      License

      -[Open Source Initiative Approved License] +[Open Source Initiative Approved License] Lua is free software distributed under the terms of the MIT license @@ -302,7 +302,7 @@ license page.

      -Copyright © 1994–2025 Lua.org, PUC-Rio. +Copyright © 1994–2026 Lua.org, PUC-Rio.

      Permission is hereby granted, free of charge, to any person obtaining a copy @@ -329,10 +329,10 @@

      diff -Nru lua-5.4.8/src/lapi.c lua-5.4.9/src/lapi.c --- lua-5.4.8/src/lapi.c 2025-05-21 18:09:15.000000000 -0300 +++ lua-5.4.9/src/lapi.c 2026-08-10 06:22:22.295456529 -0300 @@ -1089,6 +1089,7 @@ ZIO z; int status; lua_lock(L); + luaC_checkGC(L); if (!chunkname) chunkname = "?"; luaZ_init(L, &z, reader, data); status = luaD_protectedparser(L, &z, chunkname, mode); diff -Nru lua-5.4.8/src/lauxlib.c lua-5.4.9/src/lauxlib.c --- lua-5.4.8/src/lauxlib.c 2025-05-21 18:09:15.000000000 -0300 +++ lua-5.4.9/src/lauxlib.c 2026-08-10 06:22:22.311455953 -0300 @@ -501,12 +501,25 @@ }; +/* +** Get/create metatable (MT) for boxes +*/ +static void getBoxMT (lua_State *L) { + const char *BOXMT = "_UBOX*"; /* key for the metatable */ + if (luaL_getmetatable(L, BOXMT) == LUA_TNIL) { /* MT not created yet? */ + luaL_newlibtable(L, boxmt); /* create it */ + luaL_setfuncs(L, boxmt, 0); /* initialize it */ + lua_copy(L, -1, -2); /* change stack from nil,MT to MT,MT */ + lua_setfield(L, LUA_REGISTRYINDEX, BOXMT); /* store MT in the registry */ + } +} + + static void newbox (lua_State *L) { UBox *box = (UBox *)lua_newuserdatauv(L, sizeof(UBox), 0); box->box = NULL; box->bsize = 0; - if (luaL_newmetatable(L, "_UBOX*")) /* creating metatable? */ - luaL_setfuncs(L, boxmt, 0); /* set its metamethods */ + getBoxMT(L); lua_setmetatable(L, -2); } diff -Nru lua-5.4.8/src/ldo.c lua-5.4.9/src/ldo.c --- lua-5.4.8/src/ldo.c 2025-05-21 18:09:15.000000000 -0300 +++ lua-5.4.9/src/ldo.c 2026-08-10 06:22:22.586446065 -0300 @@ -206,6 +206,25 @@ /* +** Check whether stacks have enough space to run a simple function (such +** as a finalizer): At least BASIC_STACK_SIZE in the Lua stack, two +** available CallInfos, and two "slots" in the C stack. +*/ +int luaD_checkminstack (lua_State *L) { + if (getCcalls(L) >= LUAI_MAXCCALLS - 2) + return 0; /* not enough C-stack slots */ + if (L->ci->next == NULL && luaE_extendCI(L, 0) == NULL) + return 0; /* unable to allocate first ci */ + if (L->ci->next->next == NULL && luaE_extendCI(L, 0) == NULL) + return 0; /* unable to allocate second ci */ + if (L->stack_last.p - L->top.p >= BASIC_STACK_SIZE) + return 1; /* enough (BASIC_STACK_SIZE) free slots in the Lua stack */ + else /* try to grow stack to a size with enough free slots */ + return luaD_growstack(L, BASIC_STACK_SIZE, 0); +} + + +/* ** Reallocate the stack to a new size, correcting all pointers into it. ** In ISO C, any pointer use after the pointer has been deallocated is ** undefined behavior. So, before the reallocation, all pointers are @@ -503,7 +522,7 @@ -#define next_ci(L) (L->ci->next ? L->ci->next : luaE_extendCI(L)) +#define next_ci(L) (L->ci->next ? L->ci->next : luaE_extendCI(L, 1)) l_sinline CallInfo *prepCallInfo (lua_State *L, StkId func, int nret, diff -Nru lua-5.4.8/src/ldo.h lua-5.4.9/src/ldo.h --- lua-5.4.8/src/ldo.h 2025-05-21 18:09:15.000000000 -0300 +++ lua-5.4.9/src/ldo.h 2026-08-10 06:22:22.691442291 -0300 @@ -80,6 +80,7 @@ LUAI_FUNC int luaD_growstack (lua_State *L, int n, int raiseerror); LUAI_FUNC void luaD_shrinkstack (lua_State *L); LUAI_FUNC void luaD_inctop (lua_State *L); +LUAI_FUNC int luaD_checkminstack (lua_State *L); LUAI_FUNC l_noret luaD_throw (lua_State *L, int errcode); LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); diff -Nru lua-5.4.8/src/lgc.c lua-5.4.9/src/lgc.c --- lua-5.4.8/src/lgc.c 2025-05-21 18:09:15.000000000 -0300 +++ lua-5.4.9/src/lgc.c 2026-08-10 06:22:22.740440528 -0300 @@ -553,8 +553,12 @@ traverseweakvalue(g, h); else if (!weakvalue) /* strong values? */ traverseephemeron(g, h, 0); - else /* all weak */ - linkgclist(h, g->allweak); /* nothing to traverse now */ + else { /* all weak */ + if (g->gcstate == GCSpropagate) + linkgclist(h, g->grayagain); /* must visit again its metatable */ + else + linkgclist(h, g->allweak); /* must clear collected entries */ + } } else /* not weak */ traversestrongtable(g, h); @@ -1238,7 +1242,7 @@ correctgraylists(g); checkSizes(L, g); g->gcstate = GCSpropagate; /* skip restart */ - if (!g->gcemergency) + if (g->tobefnz != NULL && !g->gcemergency && luaD_checkminstack(L)) callallpendingfinalizers(L); } @@ -1628,11 +1632,12 @@ break; } case GCScallfin: { /* call remaining finalizers */ - if (g->tobefnz && !g->gcemergency) { + if (g->tobefnz && !g->gcemergency && luaD_checkminstack(L)) { g->gcstopem = 0; /* ok collections during finalizers */ work = runafewfinalizers(L, GCFINMAX) * GCFINALIZECOST; } - else { /* emergency mode or no more finalizers */ + else { /* no more finalizers or emergency mode or no enough stack + to run finalizers */ g->gcstate = GCSpause; /* finish collection */ work = 0; } diff -Nru lua-5.4.8/src/lparser.c lua-5.4.9/src/lparser.c --- lua-5.4.8/src/lparser.c 2025-05-21 18:09:16.000000000 -0300 +++ lua-5.4.9/src/lparser.c 2026-08-10 06:22:22.956432761 -0300 @@ -940,6 +940,8 @@ if (ls->t.token == '}') break; closelistfield(fs, &cc); field(ls, &cc); + checklimit(fs, cc.tostore + cc.na + cc.nh, INT_MAX/2, + "items in a constructor"); } while (testnext(ls, ',') || testnext(ls, ';')); check_match(ls, '}', '{', line); lastlistfield(fs, &cc); diff -Nru lua-5.4.8/src/lstate.c lua-5.4.9/src/lstate.c --- lua-5.4.8/src/lstate.c 2025-05-21 18:09:16.000000000 -0300 +++ lua-5.4.9/src/lstate.c 2026-08-10 06:22:22.989431574 -0300 @@ -102,14 +102,19 @@ } -CallInfo *luaE_extendCI (lua_State *L) { +CallInfo *luaE_extendCI (lua_State *L, int err) { CallInfo *ci; - lua_assert(L->ci->next == NULL); - ci = luaM_new(L, CallInfo); - lua_assert(L->ci->next == NULL); - L->ci->next = ci; + ci = luaM_reallocvector(L, NULL, 0, 1, CallInfo); + if (l_unlikely(ci == NULL)) { /* allocation failed? */ + if (err) + luaM_error(L); /* raise the error */ + return NULL; /* else only report it */ + } + ci->next = L->ci->next; ci->previous = L->ci; - ci->next = NULL; + L->ci->next = ci; + if (ci->next) + ci->next->previous = ci; ci->u.l.trap = 0; L->nci++; return ci; diff -Nru lua-5.4.8/src/lstate.h lua-5.4.9/src/lstate.h --- lua-5.4.8/src/lstate.h 2025-05-21 18:09:16.000000000 -0300 +++ lua-5.4.9/src/lstate.h 2026-08-10 06:22:22.995431358 -0300 @@ -395,7 +395,7 @@ LUAI_FUNC void luaE_setdebt (global_State *g, l_mem debt); LUAI_FUNC void luaE_freethread (lua_State *L, lua_State *L1); -LUAI_FUNC CallInfo *luaE_extendCI (lua_State *L); +LUAI_FUNC CallInfo *luaE_extendCI (lua_State *L, int err); LUAI_FUNC void luaE_shrinkCI (lua_State *L); LUAI_FUNC void luaE_checkcstack (lua_State *L); LUAI_FUNC void luaE_incCstack (lua_State *L); diff -Nru lua-5.4.8/src/lstrlib.c lua-5.4.9/src/lstrlib.c --- lua-5.4.8/src/lstrlib.c 2025-05-21 18:09:16.000000000 -0300 +++ lua-5.4.9/src/lstrlib.c 2026-08-10 06:22:23.022430388 -0300 @@ -757,7 +757,6 @@ static void prepstate (MatchState *ms, lua_State *L, const char *s, size_t ls, const char *p, size_t lp) { ms->L = L; - ms->matchdepth = MAXCCALLS; ms->src_init = s; ms->src_end = s + ls; ms->p_end = p + lp; @@ -765,8 +764,8 @@ static void reprepstate (MatchState *ms) { + ms->matchdepth = MAXCCALLS; ms->level = 0; - lua_assert(ms->matchdepth == MAXCCALLS); } diff -Nru lua-5.4.8/src/lua.c lua-5.4.9/src/lua.c --- lua-5.4.8/src/lua.c 2025-05-21 18:09:16.000000000 -0300 +++ lua-5.4.9/src/lua.c 2026-08-10 06:22:23.203423880 -0300 @@ -302,7 +302,8 @@ case '-': /* '--' */ if (argv[i][2] != '\0') /* extra characters after '--'? */ return has_error; /* invalid option */ - *first = i + 1; + /* if there is a script name, it comes after '--' */ + *first = (argv[i + 1] != NULL) ? i + 1 : 0; return args; case '\0': /* '-' */ return args; /* script "name" is '-' */ diff -Nru lua-5.4.8/src/lua.h lua-5.4.9/src/lua.h --- lua-5.4.8/src/lua.h 2025-05-21 18:09:16.000000000 -0300 +++ lua-5.4.9/src/lua.h 2026-08-10 06:22:23.240422551 -0300 @@ -18,14 +18,14 @@ #define LUA_VERSION_MAJOR "5" #define LUA_VERSION_MINOR "4" -#define LUA_VERSION_RELEASE "8" +#define LUA_VERSION_RELEASE "9" #define LUA_VERSION_NUM 504 -#define LUA_VERSION_RELEASE_NUM (LUA_VERSION_NUM * 100 + 8) +#define LUA_VERSION_RELEASE_NUM (LUA_VERSION_NUM * 100 + 9) #define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR #define LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE -#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2025 Lua.org, PUC-Rio" +#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2026 Lua.org, PUC-Rio" #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes" @@ -497,7 +497,7 @@ /****************************************************************************** -* Copyright (C) 1994-2025 Lua.org, PUC-Rio. +* Copyright (C) 1994-2026 Lua.org, PUC-Rio. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the diff -Nru lua-5.4.8/src/lutf8lib.c lua-5.4.9/src/lutf8lib.c --- lua-5.4.8/src/lutf8lib.c 2025-05-21 18:09:16.000000000 -0300 +++ lua-5.4.9/src/lutf8lib.c 2026-08-10 06:22:23.292420681 -0300 @@ -65,6 +65,8 @@ utfint res = 0; /* final result */ if (c < 0x80) /* ascii? */ res = c; + else if (c >= 0xfe) /* c >= 1111 1110b ? */ + return NULL; /* would need six or more continuation bytes */ else { int count = 0; /* to count number of continuation bytes */ for (; c & 0x40; c <<= 1) { /* while it needs continuation bytes... */ @@ -74,7 +76,7 @@ res = (res << 6) | (cc & 0x3F); /* add lower 6 bits from cont. byte */ } res |= ((utfint)(c & 0x7F) << (count * 5)); /* add first byte */ - if (count > 5 || res > MAXUTF || res < limits[count]) + if (res > MAXUTF || res < limits[count]) return NULL; /* invalid byte sequence */ s += count; /* skip continuation bytes read */ } diff -Nru lua-5.4.8/src/lvm.c lua-5.4.9/src/lvm.c --- lua-5.4.8/src/lvm.c 2025-05-21 18:09:16.000000000 -0300 +++ lua-5.4.9/src/lvm.c 2026-08-10 06:22:23.302420321 -0300 @@ -361,7 +361,12 @@ } t = tm; /* else repeat assignment over 'tm' */ if (luaV_fastget(L, t, key, slot, luaH_get)) { - luaV_finishfastset(L, t, slot, val); + /* execute 'luaV_finishfastset', but preserving the original 't' + for the barrier. 't' and 'slot' can point to the same value, + and so the assignment can change 't' value */ + GCObject *h = gcvalue(t); + setobj2t(L, cast(TValue *,slot), val); + luaC_barrierback(L, h, val); return; /* done */ } /* else 'return luaV_finishset(L, t, key, val, slot)' (loop) */