| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
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.
|
|
|
|
|
| |
Instead of receiving nil as a second argument, __close metamethods are
called with just one argument when there are no errors.
|
|
|
|
|
| |
Comments, small changes in the manual, an extra test for errors in
error handling, small changes in tests.
|
|
|
|
|
| |
'lua_numbertostrbuff' -> 'lua_numbertocstring'
'lua_pushextlstring' -> 'lua_pushexternalstring'
|
|
|
|
| |
Tables don't accept sizes larger than int.
|
|
|
|
| |
New year (2024->2025), typos in comments
|
|
|
|
|
| |
Plus some other details. (Option '-Wuninitialized' was removed from
the makefile because it is already enabled by -Wall.)
|
|
|
|
| |
Plus details
|
|
|
|
|
|
| |
'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.
|
|
|
|
|
| |
This counter will allow (in a later commit) error messages to correct
argument numbers in functions called through __call metamethods.
|
|
|
|
|
| |
It converts a Lua number to a string in a buffer, without creating
a new Lua string.
|
|
|
|
| |
Plus extra comments and other details.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
'size_t' is the common type for measuring memory. 'int' can be too
small for steps.
|
|
|
|
|
| |
No warnings for standard numerical types. Still pending alternative
numerical types.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
(As the length of any string in Lua.)
|
| |
|
|
|
|
|
| |
Lua seg. faults when asked to create the 'activelines' table for a
vararg function with no debug information.
|
|
|
|
| |
Instead of listing what it does not accept, which is always relative.
|
|
|
|
|
| |
'utf8.offset' returns two values: the initial and the final position
of the given character.
|
| |
|
|
|
|
|
| |
Corrections in comments and manual. Added note in the manual about
local variables in the REPL.
|
| |
|
| |
|
|
|
|
|
| |
Instead of preloading all non-loaded libraries, there is another
mask to select which libraries to preload.
|
|
|
|
|
|
|
|
| |
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.)
|
| |
|
|\ |
|
| |
| |
| |
| |
| | |
The standard panic function was using 'lua_tostring', which may raise
a memory-allocation error if error value is a number.
|
| |
| |
| |
| |
| | |
Creates a table preallocating memory. (It just exports to Lua the API
function 'lua_createtable'.)
|
| | |
|
| |
| |
| |
| |
| | |
The reference system has a defined way to add initial values to the
table where it operates.
|
| | |
|
| |
| |
| |
| |
| |
| | |
- back with step size in collectgarbage("step")
- adjustments in defaults for some GC parameters
- adjustments in 'luaO_codeparam'
|
| |
| |
| |
| |
| |
| | |
The generational mode also uses the parameters for the incremental
mode in its major collections, so it should be easy to change those
parameters without having to change the GC mode.
|
| | |
|
| |
| |
| |
| |
| | |
'lua_dump' signals to the writer function the end of a dump, so that
is has more freedom when using the stack.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Strings can use external buffers to store their contents.
|
| |
| |
| |
| |
| | |
A fixed buffer keeps a binary chunk "forever", so that the program
does not need to copy some of its parts when loading it.
|
|\| |
|
| |
| |
| |
| |
| | |
Registry field "LUA_NOENV" (that signals to libraries that option -E
is on) now part of the "official" API of Lua stand-alone.
|
|\| |
|
| |
| |
| |
| |
| |
| | |
'lua_resetthread' is back to its original signature, to avoid
incompatibilities in the ABI between releases of the same version.
New function 'lua_closethread' added with the "correct" signature.
|
| |
| |
| |
| | |
Typos in comments and details in the manual.
|