aboutsummaryrefslogtreecommitdiff
path: root/ljumptab.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-03-14Changes in the warning systemRoberto Ierusalimschy12-98/+79
- The warning functions get an extra parameter that tells whether message is to be continued (instead of using end-of-lines as a signal). - The user data for the warning function is a regular value, instead of a writable slot inside the Lua state.
2019-03-13'math.randomseed()' sets a somewhat random seedRoberto Ierusalimschy3-20/+36
When called with no arguments, 'math.randomseed' uses time and ASLR to generate a somewhat random seed. the initial seed when Lua starts is generated this way.
2019-03-13Strings inside Lua are not fully alignedRoberto Ierusalimschy2-10/+2
Removed code to ensure that strings inside Lua (as returned by 'lua_tolstring') always start in fully aligned addresses. Since version 5.3 the documentation does not ensure that.
2019-03-13New conversion specifier '%p' for 'string.format'Roberto Ierusalimschy3-3/+31
The call 'string.format("%p", val)' gives a Lua equivalent to the C API function 'lua_topointer'.
2019-03-13DetailsRoberto Ierusalimschy8-51/+87
Several small improvements (code style, warnings, comments, more tests), in particular: - 'lua_topointer' extended to handle strings - raises an error in 'string.format("%10q")' ('%q' with modifiers) - in the manual for 'string.format', the term "option" replaced by "conversion specifier" (the term used by the C standard)
2019-01-30After a "bad collections", avoid switching back back to generationalRoberto Ierusalimschy6-50/+134
After a major bad collection (one that collects too few objects), next collection will be major again. In that case, avoid switching back to generational mode (as it will have to switch again to incremental to do next major collection).
2019-01-08Optional 'init' argument to 'string.gmatch'Roberto Ierusalimschy6-52/+116
The function 'string.gmatch' now has an optional 'init' argument, similar to 'string.find' and 'string.match'. Moreover, there was some reorganization in the manipulation of indices in the string library. This commit also includes small janitorial work in the manual and in comments in the interpreter loop.
2019-01-04No more to-be-closed functionsRoberto Ierusalimschy8-68/+97
To-be-closed variables must contain objects with '__toclose' metamethods (or nil). Functions were removed for several reasons: * Functions interact badly with sandboxes. If a sandbox raises an error to interrupt a script, a to-be-closed function still can hijack control and continue running arbitrary sandboxed code. * Functions interact badly with coroutines. If a coroutine yields and is never resumed again, its to-be-closed functions will never run. To-be-closed objects, on the other hand, will still be closed, provided they have appropriate finalizers. * If you really need a function, it is easy to create a dummy object to run that function in its '__toclose' metamethod. This comit also adds closing of variables in case of panic.
2019-01-01No more LUA_ERRGCMM errorsRoberto Ierusalimschy10-111/+145
Errors in finalizers (__gc metamethods) are never propagated. Instead, they generate a warning.
2018-12-28Added a warning system to LuaRoberto Ierusalimschy10-15/+173
The warning system is just a way for Lua to emit warnings, messages to the programmer that do not interfere with the running program.
2018-12-27Changes in the control of C-stack overflowRoberto Ierusalimschy12-74/+170
* unification of the 'nny' and 'nCcalls' counters; * external C functions ('lua_CFunction') count more "slots" in the C stack (to allow for their possible use of buffers) * added a new test script specific for C-stack overflows. (Most of those tests were already present, but concentrating them in a single script easies the task of checking whether 'LUAI_MAXCCALLS' is adequate in a system.)
2018-12-27DetailRoberto Ierusalimschy2-3/+2
Slightly better error message for invalid conversions in 'string.format'.
2018-12-19'all' script automatically 'make's everythingRoberto Ierusalimschy3-6/+10
The script 'all', to run all tests, automatically ensures that the Lua interpreter and the test C libraries (in 'testes/libs/') are updated with any changes in 'luaconf.h'.