aboutsummaryrefslogtreecommitdiff
path: root/ltablib.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Parameters for 'lua_createtable' back to intRoberto Ierusalimschy2025-01-211-4/+4
| | | | Tables don't accept sizes larger than int.
* DetailsRoberto Ierusalimschy2024-09-121-3/+3
| | | | Fixed comments in sort partition.
* '-Wconversion' extended to all options of Lua numbersRoberto Ierusalimschy2024-07-271-12/+20
|
* Added gcc option '-Wconversion'Roberto Ierusalimschy2024-07-271-2/+2
| | | | | 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.
* Some 'unsigned int' changed to 'unsigned'Roberto Ierusalimschy2024-03-221-2/+1
| | | | | 'unsigned int' is too long sometimes. (We already write 'long' instead of 'long int'...)
* DetailsRoberto Ierusalimschy2024-03-131-1/+1
| | | | | | - 'unsigned int' -> 'unsigned' - Some explicit casts to avoid warnings - Test avoids printing the value of 'fail' (which may not be nil)
* Better handling of size limit when resizing a tableRoberto Ierusalimschy2024-02-071-2/+4
| | | | | | | | 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.)
* New function 'table.create'Roberto Ierusalimschy2024-01-181-0/+9
| | | | | Creates a table preallocating memory. (It just exports to Lua the API function 'lua_createtable'.)
* Clock component removed from 'luaL_makeseed'Roberto Ierusalimschy2023-03-231-1/+1
| | | | 'clock' can be quite slow on some machines.
* New function 'luaL_makeseed'Roberto Ierusalimschy2023-03-201-26/+3
| | | | | | This function unifies code from 'lua_newstate', 'math.randomseed', and 'table.sort' that tries to create a value with a minimum level of randomness.
* Corrected error message in 'table.remove'Roberto Ierusalimschy2022-09-071-1/+1
|
* 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).
* DetailsRoberto Ierusalimschy2021-03-291-1/+1
| | | | Comments and small improvements in the manual.
* Broadening the use of branch hintsRoberto Ierusalimschy2021-02-241-4/+5
| | | | | | 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).
* Bug: 'string.concat' error message uses wrong formatRoberto Ierusalimschy2021-02-151-1/+1
|
* Details (typos in comments)Roberto Ierusalimschy2019-07-051-1/+1
|
* DetailsRoberto Ierusalimschy2019-06-031-1/+1
| | | | | Several small changes from feedback on 5.4 alhpa rc1 (warnings, typos in the manual, and the like)
* DetailsRoberto Ierusalimschy2019-05-131-1/+1
| | | | | | - 'luaL_setfuncs' avoids creating closures for placeholders. - Fixed some warnings about unused values in comma expressions. - Comments.
* Small optimizations in range checksRoberto Ierusalimschy2019-03-271-2/+6
| | | | | | | | Checks of the form '1 <= x && x <= M' were rewritten in the form '(unsigned)x - 1 < (unsigned)M', which is usually more efficient. (Other similar checks have similar translations.) Although some compilers do these optimizations, that does not happen for all compilers or all cases.
* 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.
* no more nil-in-tableRoberto Ierusalimschy2018-04-041-3/+3
|
* avoid functions named 'pack'Roberto Ierusalimschy2018-03-161-5/+5
| | | | (name too common, may collide when doing 'onelua.c')
* removed compatibility code with older versionsRoberto Ierusalimschy2018-02-271-27/+1
|
* first (parcial) implementation of 'keyin'/'removekey'Roberto Ierusalimschy2018-02-251-3/+3
| | | | (still no metamethods, no raw verssions)
* in 'table.move', destination table can be source table even ifRoberto Ierusalimschy2016-02-251-3/+3
| | | | given as an explicit extra argument
* details (removed silly use of 'luaL_opt' + better error messagesRoberto Ierusalimschy2016-02-081-3/+3
| | | | in cases of "table expected")
* in 'table.sort': 'typedef' for type of indices + removed stack checkRoberto Ierusalimschy2015-12-141-16/+17
| | | | (recursion is in the C stack, not in the Lua stack!)
* randomness in 'table.sort' used only when needed (big imbalance inRoberto Ierusalimschy2015-11-251-38/+73
| | | | partition result) + small refactoring
* handling 'clock_t' and 'time_t' correctly in ISO C point of viewRoberto Ierusalimschy2015-11-241-5/+14
|
* using unsigned int (instead of int) in 'table.sort' to avoid overflowsRoberto Ierusalimschy2015-11-231-17/+23
| | | | (when computing the pivot and in original table size)
* details (merging declarations with initialization)Roberto Ierusalimschy2015-11-231-7/+5
|
* randomness in pivot for 'table.sort' done by a macro (easier to change)Roberto Ierusalimschy2015-11-201-11/+17
|
* in 'table.sort': tighter checks for invalid order function +Roberto Ierusalimschy2015-11-121-5/+22
| | | | | "random" pivot for larger intervals (to avoid attacks with bad data)
* janitor work on 'table.sort': added comments, partition code movedRoberto Ierusalimschy2015-11-061-54/+76
| | | | | to a separated function, code conventions updated, etc. No changes at all in the logic/algorithm
* 'table.move' tries to copy elements in increasing orderRoberto Ierusalimschy2015-09-171-4/+10
| | | | whenever possible
* 'tablib' does not try to use raw operations when possible: fastRoberto Ierusalimschy2015-09-091-87/+78
| | | | | track should make standard operations fast enough to forgo raw accesses
* avoid subtle possibility of arithmetic overflowRoberto Ierusalimschy2015-07-041-5/+5
|
* better check for overflows in 'table.move' (removes restriction thatRoberto Ierusalimschy2015-01-131-3/+5
| | | | initial position should be positive)
* added include for 'lprefix.h', for stuff that must be added beforeRoberto Ierusalimschy2014-11-021-4/+6
| | | | any other header file
* `name' in comments changed to 'name'Roberto Ierusalimschy2014-10-251-3/+3
|
* macros 'LUA_QL'/'LUA_QL' deprecatedRoberto Ierusalimschy2014-10-171-4/+4
|
* 'luaL_getmetafield' returns type of metafield (instead of a boolean)Roberto Ierusalimschy2014-09-221-3/+3
|
* new functions 'lua_geti/lua_seti' (non raw)Roberto Ierusalimschy2014-08-211-24/+5
|
* 'table.copy' -> 'table.move' + optional parameter moved to the end +Roberto Ierusalimschy2014-08-211-21/+22
| | | | several functions operate on "virtual" tables too
* added some casts between integral types (to avoid warnings)Roberto Ierusalimschy2014-07-291-5/+5
|
* first implementation for 'table.copy'Roberto Ierusalimschy2014-07-251-1/+39
|
* Table library now respects '__index'/'__newindex' metamethodsRoberto Ierusalimschy2014-07-161-43/+96
|
* more direct implementation of 'table.pack'Roberto Ierusalimschy2014-05-161-10/+6
|
* detail (avoid "casting down" in case lua_Integer is smaller than int)Roberto Ierusalimschy2014-04-121-2/+2
|