| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
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.
|
| |
| |
| |
| |
| | |
Also, small tweak in makefile. (-Wsign-compare is already enabled by
-Wextra.)
|
| |
| |
| |
| | |
'clock' can be quite slow on some machines.
|
| |
| |
| |
| |
| |
| | |
This function unifies code from 'lua_newstate', 'math.randomseed',
and 'table.sort' that tries to create a value with a minimum level
of randomness.
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
Plus some other improvements in the manual.
|
| |
|
|
|
|
|
|
| |
Manual has a new section explaining multires expressions, lists of
expressions, and adjustments. This commit also corrects some comments
in the code.
|
| |
|
|
|
|
|
| |
Comments + manual + identation + asserts about stack limits that were
not allowing the use of the full stack
|
|
|
|
|
|
| |
The explanation includes the limit case of maxinteger being a border.
It also avoids the term "natural", which might include large floats
with natural values.
|
| |
|
|
|
|
| |
As the GC is not reentrant, finalizers should not be able to invoke it.
|
|
|
|
|
|
| |
The pointer to the metamethod can be invalidated by a finalizer that
can run during a GC in 'checkstackGCp'. (This commit also fixes a
detail in the manual.) Bug introduced in commit 91673a8ec.
|
|
|
|
|
| |
Better explanation about the guaranties of multiple assignment in
the manual.
|
|
|
|
|
| |
When calling 'sprintf', not all conversion specifiers accept all
flags; some combinations are undefined behavior.
|
| |
|
|
|
|
|
|
| |
All string-buffer operations can potentially change the stack in
unspecified ways; the push/pop documentation in the manual should
reflect that.
|
| |
|
|
|
|
| |
Comments and small improvements in the manual.
|
|
|
|
|
|
| |
The existence of 'lua_closeslot' is no reason for lua_pop not to close
to-be-closed variables too. It is too error-prone for lua_pop not to
close tbc variables being popped from the stack.
|
| |
|
| |
|
|
|
|
|
|
|
| |
When, inside a coroutine, a C function with to-be-closed slots return,
the corresponding metamethods can yield. ('__close' metamethods called
through 'lua_closeslot' still cannot yield, as there is no continuation
to go when resuming.)
|
|
|
|
|
|
| |
New field 'lua_State.ptbc' keeps to-be-closed variable until its
upvalue is created, so that it can be closed in case of a
memory-allocation error.
|
|
|
|
|
| |
The sort function must define a (strict) weak order for a correct
sorting. A partial order is not enough.
|