aboutsummaryrefslogtreecommitdiff
path: root/lbaselib.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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-7/+8
| | | | | No warnings for standard numerical types. Still pending alternative numerical types.
* llimits.h being used by all Lua codeRoberto Ierusalimschy2024-06-201-0/+1
| | | | | | The definitions in llimits.h are useful not only for the core. That header only defines types and '#define's, so libs and core still do not share any real code/data.
* 'getmode' renamed to 'getMode'Roberto Ierusalimschy2024-04-081-3/+3
| | | | | | The name 'getmode' conficts with a function from BSD, defined in <unistd.h>. Although 'lbaselib.c' cannot include that header, 'onelua.c' can.
* New mechanism to query GC parametersRoberto Ierusalimschy2024-01-161-4/+4
|
* Several tweaks in the garbage collectorRoberto Ierusalimschy2023-12-271-6/+4
| | | | | | - back with step size in collectgarbage("step") - adjustments in defaults for some GC parameters - adjustments in 'luaO_codeparam'
* Removed compatibility option LUA_COMPAT_GCPARAMSRoberto Ierusalimschy2023-12-221-20/+3
| | | | | | The meaning of different GC parameters changed, so there is point in supporting old values for them. The new code simply ignores the parameters when changing the GC mode, so the incompatibility is small.
* New option "setparms" for 'collectgarbage'Roberto Ierusalimschy2023-12-221-5/+29
| | | | | | 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.
* First criteria for shifts minor<->majorRoberto Ierusalimschy2023-12-071-6/+7
|
* Removed deprecated options in 'lua_gc'Roberto Ierusalimschy2023-11-301-12/+2
| | | | Options 'setpause' and 'setstepmul' were deprecated in Lua 5.4.
* Added suport for Fixed BuffersRoberto Ierusalimschy2023-09-051-2/+13
| | | | | A fixed buffer keeps a binary chunk "forever", so that the program does not need to copy some of its parts when loading it.
* Bug: GC is not reentrantRoberto Ierusalimschy2021-12-131-2/+17
| | | | As the GC is not reentrant, finalizers should not be able to invoke it.
* Avoid overflows when incrementing parameters in CRoberto Ierusalimschy2021-09-221-1/+2
| | | | | | Any C function can receive maxinteger as an integer argument, and therefore cannot increment it without some care (e.g., doing unsigned arithmetic as the core does).
* Allow yields inside '__pairs'Roberto Ierusalimschy2021-03-291-1/+6
|
* Broadening the use of branch hintsRoberto Ierusalimschy2021-02-241-6/+6
| | | | | | More uses of macros 'likely'/'unlikely' (renamed to 'l_likely'/'l_unlikely'), both in range (extended to the libraries) and in scope (extended to hooks, stack growth).
* Janitorial workRoberto Ierusalimschy2021-01-251-1/+2
| | | | Comments, code details, identation.
* Added macro 'luaL_pushfail'Roberto Ierusalimschy2019-08-161-3/+3
| | | | | | | | The macro 'luaL_pushfail' documents all places in the standard libraries that return nil to signal some kind of failure. It is defined as 'lua_pushnil'. The manual also got a notation (@fail) to document those returns. The tests were changed to be agnostic regarding whether 'fail' is 'nil' or 'false'.
* Added control messages to warningsRoberto Ierusalimschy2019-08-151-2/+2
| | | | | | | Added the concept of control messages to the warning system, plus the implementation of the controls "@on"/"@off" to turn warnings on/off. Moreover, the warning system in the test library adds some other controls to ease the test of warnings.
* Function 'warn' is varargRoberto Ierusalimschy2019-06-041-2/+13
| | | | | | | Instead of a 'tocont' flag, the function 'warn' in Lua now receives all message pieces as multiple arguments in a single call. Besides being simpler to use, this implementation ensures that Lua code cannot create unfinished warnings.
* 'print' does not call 'tostring' to format its argumentsRoberto Ierusalimschy2019-04-101-11/+5
|
* Changes in the warning systemRoberto Ierusalimschy2019-03-141-1/+1
| | | | | | | | - 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.
* Added a warning system to LuaRoberto Ierusalimschy2018-12-281-0/+8
| | | | | The warning system is just a way for Lua to emit warnings, messages to the programmer that do not interfere with the running program.
* DetailsRoberto Ierusalimschy2018-12-111-1/+1
| | | | | | | | - in 'luaB_tonumber', do not need to "checkany" when argument is a number. - in 'lua_resume', the call to 'luaD_rawrunprotected' cannot return a status equal to -1.
* Better error messages for some polymorphic functionsRoberto Ierusalimschy2018-12-101-4/+3
| | | | | | | | | New auxiliary functions/macros 'luaL_argexpected'/'luaL_typeerror' ease the creation of error messages such as bad argument #2 to 'setmetatable' (nil or table expected, got boolean) (The novelty being the "got boolean" part...)
* Removed extra information from RCS keyword stringsRoberto Ierusalimschy2018-08-231-1/+1
| | | | | Version numbers and dates (mostly wrong) from RCS keyword strings removed from all source files; only the file name are kept.
* new experimental syntax using reserved word 'undef'Roberto Ierusalimschy2018-03-071-19/+1
|
* removed compatibility code with older versionsRoberto Ierusalimschy2018-02-271-26/+12
|
* metamethods for 'removekey'/'keyin'Roberto Ierusalimschy2018-02-271-5/+3
|
* first (parcial) implementation of 'keyin'/'removekey'Roberto Ierusalimschy2018-02-251-1/+21
| | | | (still no metamethods, no raw verssions)
* 'collectgarbage' returns old mode when changing modeRoberto Ierusalimschy2018-02-051-5/+9
|
* detail ('signal' -> 'sign' in comments)Roberto Ierusalimschy2017-11-161-2/+2
|
* new constant 'LUA_GNAME' for the name of the global table "_G"Roberto Ierusalimschy2017-06-271-3/+3
|
* revamping the incremental collectorRoberto Ierusalimschy2017-05-261-6/+33
| | | | | | Some simplifications (not counting bytes, couting only slots visited; no more 'gcfinnum'); more GC parameters; using vararg in 'lua_gc' to set parameters in different GC modes
* generational collection: new attempt (still incomplete)Roberto Ierusalimschy2017-02-231-3/+3
|
* bug (with compat on): 'ipairs' can work with any type that providesRoberto Ierusalimschy2016-09-051-2/+2
| | | | | an __index; so, 'pairsmeta' should not check for tables. ('pairs' already checks for tables through 'next'.)
* details ('error' does not coerce numbers to strings + comments)Roberto Ierusalimschy2016-04-111-6/+5
|
* with 'fast tracks', there is no need to do raw accesses in 'ipairs'Roberto Ierusalimschy2015-10-291-19/+6
|
* with string cache, it is not that important for 'type' to avoidRoberto Ierusalimschy2015-06-261-13/+5
| | | | 'lua_pushstring'
* details (avoid 'lint' warnings)Roberto Ierusalimschy2015-03-281-2/+2
|
* 'ipairs' needs an argumentRoberto Ierusalimschy2014-12-101-1/+2
|
* 'assert' checks that it has (at least) one parameter + 'assert' ensuresRoberto Ierusalimschy2014-12-081-4/+5
| | | | it passes only one value to 'error'
* removed unneeded test (result of b_str2int is already checkedRoberto Ierusalimschy2014-11-101-3/+1
| | | | against length)
* added include for 'lprefix.h', for stuff that must be added beforeRoberto Ierusalimschy2014-11-021-4/+5
| | | | any other header file
* definitions for 'luai_writestring'/'luai_writeline'/'luai_writestringerror'Roberto Ierusalimschy2014-10-291-4/+4
| | | | | moved to 'lauxlib.h' (they do not need to be stable or configurable) + prefixes changed from 'luai_' to 'lua_' (they are not part of the core)
* `name' in comments changed to 'name'Roberto Ierusalimschy2014-10-251-2/+2
|
* 'lua_stringtonum' -> 'lua_stringtonumber'Roberto Ierusalimschy2014-10-171-2/+2
|
* macros 'LUA_QL'/'LUA_QL' deprecatedRoberto Ierusalimschy2014-10-171-3/+2
|
* 'lua_strtonum' -> 'lua_stringtonum'Roberto Ierusalimschy2014-10-151-2/+2
|
* 'lua_Kcontext' -> 'lua_KContext'Roberto Ierusalimschy2014-10-071-3/+3
|
* deprecated "cast macros" ('luaL_checkint', 'luaL_optint', etc.)Roberto Ierusalimschy2014-10-011-9/+9
|