aboutsummaryrefslogtreecommitdiff
path: root/manual (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Better documentation for LUA_ERRERRRoberto I2025-08-201-2/+11
| | | | Not all errors in a message handler generate a LUA_ERRERR.
* Functions 'frexp'-'ldexp' back to the math libraryRoberto I2025-08-091-1/+18
| | | | | They are basic for anything that handles the representation of floating numbers.
* DetailsRoberto I2025-08-091-12/+20
|
* Short strings can be external, tooRoberto Ierusalimschy2025-07-151-9/+3
| | | | | | | That complicates a little object equality (and therefore table access for long strings), but the old behavior was somewhat weird. (Short strings, a concept otherwise absent from the manual, could not be external.)
* Optional initialization for global declarationsRoberto Ierusalimschy2025-07-081-8/+10
|
* Manual updated to version 5.5Roberto Ierusalimschy2025-06-272-9/+9
|
* Check string indices when loading binary chunkRoberto Ierusalimschy2025-06-171-7/+5
| | | | | Lua is not religious about that, but it tries to avoid crashes when loading binary chunks.
* The main thread cannot be closedRoberto Ierusalimschy2025-06-131-2/+2
| | | | | | No thread started with pcall (instead of resume) can be closed, because coroutine.close would not respect the expected number of results from the protected call.
* A coroutine can close itselfRoberto Ierusalimschy2025-06-121-10/+26
| | | | | A call to close itself will close all its to-be-closed variables and return to the resume that (re)started the coroutine.
* Loading a binary chunk should not break assertionsRoberto Ierusalimschy2025-06-041-0/+3
| | | | | Although the execution of a bad binary chunk can crash the interpreter, simply loading it should be safe.
* Proper error message when jumping into 'global *'Roberto Ierusalimschy2025-05-181-1/+1
| | | | | | A goto cannot jump into the scope of any variable declaration, including 'global *'. To report the error, it needs a "name" for the scope it is entering.
* Variable attributes can prefix name listRoberto Ierusalimschy2025-05-181-13/+17
| | | | | In this format, the attribute applies to all names in the list; e.g. "global<const> print, require, math".
* Collective declaration for globals ('global *')Roberto Ierusalimschy2025-05-131-18/+58
|
* New syntax 'global function'Roberto Ierusalimschy2025-05-081-2/+13
|
* First implementation of global declarationsRoberto Ierusalimschy2025-05-051-74/+110
|
* io.write returns number of written bytes on errorRoberto Ierusalimschy2025-04-031-0/+3
|
* Detail in the manualRoberto Ierusalimschy2025-03-171-6/+8
|
* Small changes in the manualRoberto Ierusalimschy2025-03-121-16/+22
|
* Error object cannot be nilRoberto Ierusalimschy2025-02-281-1/+10
| | | | | Lua will change a nil as error object to a string message, so that it never reports an error with nil as the error object.
* '__close' gets no error object if there is no errorRoberto Ierusalimschy2025-02-281-3/+4
| | | | | Instead of receiving nil as a second argument, __close metamethods are called with just one argument when there are no errors.
* DetailsRoberto Ierusalimschy2025-02-261-1/+1
| | | | | Comments, small changes in the manual, an extra test for errors in error handling, small changes in tests.
* Renaming two new functionsRoberto Ierusalimschy2025-01-271-2/+2
| | | | | 'lua_numbertostrbuff' -> 'lua_numbertocstring' 'lua_pushextlstring' -> 'lua_pushexternalstring'
* Parameters for 'lua_createtable' back to intRoberto Ierusalimschy2025-01-211-3/+3
| | | | Tables don't accept sizes larger than int.
* DetailsRoberto Ierusalimschy2025-01-161-1/+1
| | | | New year (2024->2025), typos in comments
* Fixed conversion warnings from clangRoberto Ierusalimschy2025-01-141-4/+3
| | | | | Plus some other details. (Option '-Wuninitialized' was removed from the makefile because it is already enabled by -Wall.)
* Improvements in the manualRoberto Ierusalimschy2025-01-101-14/+20
| | | | Plus details
* Debug information about extra arguments from __callRoberto Ierusalimschy2024-11-191-2/+11
| | | | | | 'debug.getinfo' can return number of extra arguments added to a call by a chain of __call metavalues. That information is being used to improve error messages about errors in these extra arguments.
* Counter for length of chains of __call metamethodsRoberto Ierusalimschy2024-11-161-0/+4
| | | | | This counter will allow (in a later commit) error messages to correct argument numbers in functions called through __call metamethods.
* New function 'lua_numbertostrbuff'Roberto Ierusalimschy2024-10-231-1/+16
| | | | | It converts a Lua number to a string in a buffer, without creating a new Lua string.
* Some adjustments in transition minor->majorRoberto Ierusalimschy2024-10-181-1/+4
| | | | Plus extra comments and other details.
* 'objsize' broke in smaller piecesRoberto Ierusalimschy2024-09-301-21/+22
|
* No errors in 'luaO_pushvfstring'Roberto Ierusalimschy2024-09-201-9/+16
| | | | | | Any call to 'va_start' must have a corresponding call to 'va_end'; so, functions called between them (luaO_pushvfstring in particular) cannot raise errors.
* Parameter for lua_gc/LUA_GCSTEP changed to 'size_t'Roberto Ierusalimschy2024-09-101-1/+1
| | | | | 'size_t' is the common type for measuring memory. 'int' can be too small for steps.
* Added gcc option '-Wconversion'Roberto Ierusalimschy2024-07-271-1/+1
| | | | | No warnings for standard numerical types. Still pending alternative numerical types.
* Explicit limit for number of results in a callRoberto Ierusalimschy2024-07-181-2/+8
| | | | | | The parameter 'nresults' in 'lua_call' and similar functions has a limit of 250. It already had an undocumented (and unchecked) limit of SHRT_MAX, but it is seldom larger than 2.
* Maximum stack size may not fit in unsigned shortRoberto Ierusalimschy2024-07-161-6/+9
| | | | | | Therefore, fields ftransfer/ntransfer in lua_Debug must have type 'int'. (Maximum stack size must fit in an 'int'.) Also, this commit adds check that maximum stack size respects size_t for size in bytes.
* Length of external strings must fit in Lua integerRoberto Ierusalimschy2024-06-241-0/+2
| | | | (As the length of any string in Lua.)
* Details in the manualRoberto Ierusalimschy2024-06-211-4/+9
|
* Bug: Active-lines for stripped vararg functionsRoberto Ierusalimschy2024-06-041-6/+6
| | | | | Lua seg. faults when asked to create the 'activelines' table for a vararg function with no debug information.
* Manual for 'string.format' lists what it acceptsRoberto Ierusalimschy2024-06-041-3/+6
| | | | Instead of listing what it does not accept, which is always relative.
* utf8.offset returns also final position of characterRoberto Ierusalimschy2024-05-271-8/+14
| | | | | 'utf8.offset' returns two values: the initial and the final position of the given character.
* Manual: errors in lua_toclose are not memory errorsRoberto Ierusalimschy2024-05-231-1/+4
|
* DetailsRoberto Ierusalimschy2024-05-081-9/+23
| | | | | Corrections in comments and manual. Added note in the manual about local variables in the REPL.
* New year (2024)Roberto Ierusalimschy2024-05-021-1/+1
|
* DetailsRoberto Ierusalimschy2024-03-281-4/+10
|
* New interface to function 'luaL_openselectedlibs'Roberto Ierusalimschy2024-02-152-31/+56
| | | | | Instead of preloading all non-loaded libraries, there is another mask to select which libraries to preload.
* Better handling of size limit when resizing a tableRoberto Ierusalimschy2024-02-071-1/+1
| | | | | | | | Avoid silent conversions from int to unsigned int when calling 'luaH_resize'; avoid silent conversions from lua_Integer to int in 'table.create'; MAXASIZE corrected for the new implementation of arrays; 'luaH_resize' checks explicitly whether new size respects MAXASIZE. (Even constructors were bypassing that check.)
* DetailsRoberto Ierusalimschy2024-01-291-1/+1
|
* Merge branch 'master' into nextversionRoberto Ierusalimschy2024-01-251-0/+4
|\
| * Panic functions should not raise errorsRoberto Ierusalimschy2023-11-241-0/+4
| | | | | | | | | | The standard panic function was using 'lua_tostring', which may raise a memory-allocation error if error value is a number.