aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Small change in scope of variables in repeat-untilHEADv5.5.1masterRoberto I2026-07-232-1/+20
| | | | | | A close instruction is still inside the scope of the variables it is closing. The extra close in a repeat-until (to close variables before repeating the loop) was being coded outside that scope.
* DetailsRoberto I2026-07-225-9/+18
| | | | | | - Some api_checknelems changed to the more restrict api_checkpop. - Added a class to the html for APIs in the manual. - Comments and manual.
* Avoid casts to 'union GCUnion*'Roberto I2026-07-211-20/+20
| | | | | | | The union may have alignment requirements stricter than some of its members. Some checking tools (e.g., gcc with options -fsanitize) can then complain that the result of a cast from pointer to member to pointer to the union is misaligned.
* MacOS by default uses statically linked readlineRoberto I2026-07-152-6/+4
| | | | (plus detail in the manual)
* Removed compiler option LUA_COMPAT_LOOPVARRoberto I2026-07-133-23/+2
| | | | | It makes loop variables read-only, but it does not restore the old semantics, so it is not helpful for compatibility.
* Bug: Issues with write barrier for __newindexRoberto I2026-07-122-6/+24
| | | | | | | | | | In 'luaV_finishset', there is an update on a table that is a field on another table. If the first table is the same as the one with the field (e.g., after 't.__newindex = t'), the update can change the value on that field (e.g., there may be a collision and the field is moved, or the field being updated is '__newindex' itself). After that, the barrier is called with the table stored in that field, which is not the correct table anymore.
* Bug: 'luaL_newmetatable' used in a wrong wayRoberto I2026-06-171-2/+15
| | | | | The call to 'luaL_newmetatable' in 'newbox' can leave an incomplete metatable in the registry, if 'luaL_setfuncs' raises a memory error.
* Removed unused function 'luaD_inctop'Roberto I2026-06-032-7/+0
| | | | Commit 3228a97 removed all its uses.
* Cleaning 'luaP_isIT' and 'luaP_isOT'Roberto I2026-05-283-23/+17
| | | | | | - 'luaP_isOT' is only used for tests, so it is defined as a macro to avoid wasting space with an unused function. - 'luaP_isIT' must include OP_VARARGPREP.
* Avoid warning in some compilersRoberto I2026-05-081-0/+1
| | | | | In function 'funcargs', some compilers can complain that 'args' can be used unitialized, due to the default case (syntax error).
* Small correction in luaP_opmodesRoberto I2026-04-291-1/+1
| | | | OP_VARARGPREP neither sets nor uses L->top.
* DetailsRoberto Ierusalimschy2026-04-283-7/+12
|
* new macro 'setnilvalue2s'Roberto I2026-04-239-23/+24
|
* 'load' reader function doesn't need to preserve stackRoberto I2026-04-231-18/+9
|
* Bug: 'lua_load' does not preserve the stackRoberto I2026-04-237-27/+77
| | | | | | | 'lua_load' does not preserve the stack through the calls to the reader function, as it should. Immediately after the first call (to detect whether chunk is binary) it adds stuff, and it also adds a new table when starting the compilation of each new function.
* DetailsRoberto I2026-04-212-11/+21
| | | | | Added compiler option LUA_NODEBUGLIB to make Lua with no open debug library + small improvements in the manual.
* Better error messages for vararg-table fieldsRoberto I2026-04-132-1/+4
|
* Avoid macros luaL_loadbuffer and luaL_loadfileRoberto I2026-04-076-15/+17
| | | | | Use luaL_loadbufferx and luaL_loadfilex instead, being explicit about whether to accept binary chunks.
* Stricter test for use of '__builtin_expect'Roberto I2026-04-011-1/+1
| | | | GCC introduced this macro in version 3.
* Bug: wrong initialization in result from 'gmatch'Roberto Ierusalimschy2026-04-012-2/+18
| | | | | Function returned by 'string.gmatch' can be left in an inconsistent state after an error.
* Bug: Loading a binary chunk does not run the GCRoberto I2026-04-011-0/+1
|
* Adjustment in useless parameter L in macros luai_num*Roberto I2026-03-152-9/+9
|
* 'table.tunpack' using 'aux_getn' like the othersRoberto I2026-03-092-4/+20
| | | | | | 'table.tunpack' was not checking its first argument, which could result in error messages generated inside the API, without location information.
* DetailsRoberto I2026-03-092-2/+2
|
* Slightly better documentation for LUAI_MAXALIGNRoberto I2026-03-092-4/+15
|
* BUG: shift overflow in utf-8 decodeRoberto I2026-02-183-3/+18
| | | | | An initial byte \xFF will ask for 7 continuation bytes, and then the shift by (count * 5) will try to shift 35 bits.
* DetailsRoberto Ierusalimschy2026-02-102-10/+10
| | | | | Spaces + added initialization to the documentation of global declarations.
* Avoid an assignment of values that overlapRoberto Ierusalimschy2026-02-091-4/+5
| | | | | | The original code was like this, where t->u.ind.t and t->u.info overlap: t->u.ind.t = cast_byte((t->k == VLOCAL) ? t->u.var.ridx: t->u.info);
* Environment variable for readline library nameRoberto I2026-01-302-7/+40
| | | | | The name of the readline library can be changed from its default value through environment variable LUA_READLINELIB.
* New year and (eventual) new releaseRoberto I2026-01-292-4/+4
|
* Explanation about char* parameters in the C APIRoberto I2026-01-231-1/+13
|
* Another way to handle option -ERoberto I2026-01-221-6/+16
| | | | | | A pointer to function 'l_getenv' can point to the regular 'getenv' or to a dumb function (that always returns NULL) to ignore environment variables.
* Some compilation options configurable from makefileRoberto Ierusalimschy2026-01-205-5/+20
| | | | | | Compilation options LUA_COMPAT_GLOBAL, LUA_COMPAT_LOOPVAR, and LUA_READLINELIB do not affect the API, so they can be changed through the make file.
* New compile option LUA_COMPAT_LOOPVARRoberto I2026-01-162-2/+18
| | | | When on, this option makes for-loop control variables not read only.
* More effort in avoiding errors in finalizersRoberto I2026-01-118-16/+118
| | | | | | | | Before calling a finalizer, Lua not only checks stack limits, but actually ensures that a minimum number of slots are already allocated for the call. (If it cannot ensure that, it postpones the finalizer.) That avoids finalizers not running due to memory errors that the programmer cannot control.
* Special case for 'string.rep' over an empty stringRoberto I2026-01-042-5/+5
|
* BUG: Possible overflow in 'string.packsize'Roberto I2026-01-041-1/+1
| | | | | 'string.packsize' can overflow result in 32-bit machines using 64-bit integers, as LUA_MAXINTEGER may not fit into size_t.
* DetailsRoberto I2026-01-041-4/+5
| | | | | In an assignment like 'a = &b', is looks suspicious if 'a' has a scope larger than 'b'.
* DetailsRoberto I2025-12-302-5/+4
| | | | | Some comments still talked about bit 'isrealasize', which has been removed.
* BUG: Arithmetic overflow in 'collectgarbage"step"'Roberto I2025-12-271-2/+7
| | | | | | | The computation of a new debt could overflow when we give a too large step to 'collectgarbage"step"' and the current debt was already negative. This is only an issue if your platform cares for it or if you compile Lua with an option like '-fsanitize=undefined'.
* DetailsRoberto I2025-12-233-3/+3
| | | | | typo in comment + formatting + logical 'and' was written as a bitwise operation (makes code more fragile)
* GC checks stack space before running finalizerv5.5.0Roberto I2025-12-133-3/+16
| | | | | | If the stack does not have some minimum available space, the GC defers calling a finalizer until the next cycle. That avoids errors while running a finalizer that the programmer cannot control.
* 'luaL_newstate' starts state with warnings onRoberto I2025-12-132-2/+3
| | | | It is easier to forget to turn them on then to turn them off.
* Format adjust in the manualRoberto I2025-12-101-19/+19
| | | | | Lists in inline code don't get a space after commas. (That keeps the code more compact and avoids line breaks in the middle of the code.)
* DetailsRoberto I2025-12-082-8/+8
| | | | | - Avoid fixing name "_ENV" in the code - Small improvements in the manual
* Wrong assert in 'luaK_indexed'Roberto I2025-12-081-3/+5
|
* In luaB_close, running coroutines do not go to defaultrcRoberto I2025-12-011-4/+6
| | | | This should had been corrected in commit fd897027f1.
* Functions with vararg tables don't need hidden args.Roberto I2025-11-289-43/+70
| | | | | Vararg functions with vararg tables don't use the arguments hidden in the stack; therfore, it doesn't need to build/keep them.
* New conceptual model for varargRoberto I2025-11-2611-69/+154
| | | | | | Conceptually, all functions get their vararg arguments in a vararg table. The storing of vararg arguments in the stack is always treated as an optimization.
* DetailsRoberto I2025-11-243-16/+23
| | | | Comments, capitalization in the manual, globals in test 'heady.lua'