| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
| |
Lua is not religious about that, but it tries to avoid crashes when
loading binary chunks.
|
| |
|
|
|
|
| |
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 call to close itself will close all its to-be-closed variables and
return to the resume that (re)started the coroutine.
|
| |
|
|
|
| |
Although the execution of a bad binary chunk can crash the interpreter,
simply loading it should be safe.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
| |
In this format, the attribute applies to all names in the list;
e.g. "global<const> print, require, math".
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
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.
|
| |
|
|
|
| |
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.
|
| | | |
|