Roberto Ierusalimschy
e888976bc6
Details (typos in comments)
5 years ago
Roberto Ierusalimschy
2c68e66570
Details
Several small changes from feedback on 5.4 alhpa rc1 (warnings,
typos in the manual, and the like)
6 years ago
Roberto Ierusalimschy
0b63d79b36
Details
- 'luaL_setfuncs' avoids creating closures for placeholders.
- Fixed some warnings about unused values in comma expressions.
- Comments.
6 years ago
Roberto Ierusalimschy
d12262068d
Small optimizations in range checks
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.
6 years ago
Roberto Ierusalimschy
f99509581e
Removed extra information from RCS keyword strings
Version numbers and dates (mostly wrong) from RCS keyword strings
removed from all source files; only the file name are kept.
6 years ago
Roberto Ierusalimschy
03c6a05ec8
no more nil-in-table
7 years ago
Roberto Ierusalimschy
89da4168df
avoid functions named 'pack'
(name too common, may collide when doing 'onelua.c')
7 years ago
Roberto Ierusalimschy
34b00c16e2
removed compatibility code with older versions
7 years ago
Roberto Ierusalimschy
d766e2ae17
first (parcial) implementation of 'keyin'/'removekey'
(still no metamethods, no raw verssions)
7 years ago
Roberto Ierusalimschy
7d6b78ee79
in 'table.move', destination table can be source table even if
given as an explicit extra argument
9 years ago
Roberto Ierusalimschy
f79b4568ae
details (removed silly use of 'luaL_opt' + better error messages
in cases of "table expected")
9 years ago
Roberto Ierusalimschy
e383941652
in 'table.sort': 'typedef' for type of indices + removed stack check
(recursion is in the C stack, not in the Lua stack!)
9 years ago
Roberto Ierusalimschy
5936eb16d8
randomness in 'table.sort' used only when needed (big imbalance in
partition result) + small refactoring
9 years ago
Roberto Ierusalimschy
7dc3ca7b8e
handling 'clock_t' and 'time_t' correctly in ISO C point of view
9 years ago
Roberto Ierusalimschy
c231a5e2b6
using unsigned int (instead of int) in 'table.sort' to avoid overflows
(when computing the pivot and in original table size)
9 years ago
Roberto Ierusalimschy
dc9ac5b8c2
details (merging declarations with initialization)
9 years ago
Roberto Ierusalimschy
146508b28e
randomness in pivot for 'table.sort' done by a macro (easier to change)
9 years ago
Roberto Ierusalimschy
bde03eeb48
in 'table.sort': tighter checks for invalid order function +
"random" pivot for larger intervals (to avoid attacks with
bad data)
9 years ago
Roberto Ierusalimschy
02340375be
janitor work on 'table.sort': added comments, partition code moved
to a separated function, code conventions updated, etc. No changes
at all in the logic/algorithm
9 years ago
Roberto Ierusalimschy
0f1f51be4b
'table.move' tries to copy elements in increasing order
whenever possible
9 years ago
Roberto Ierusalimschy
bda83e22c0
'tablib' does not try to use raw operations when possible: fast
track should make standard operations fast enough to forgo
raw accesses
9 years ago
Roberto Ierusalimschy
8217e0d4fe
avoid subtle possibility of arithmetic overflow
9 years ago
Roberto Ierusalimschy
ae27be40c9
better check for overflows in 'table.move' (removes restriction that
initial position should be positive)
10 years ago
Roberto Ierusalimschy
28fdbcf393
added include for 'lprefix.h', for stuff that must be added before
any other header file
10 years ago
Roberto Ierusalimschy
bdf566a8a3
`name' in comments changed to 'name'
10 years ago
Roberto Ierusalimschy
f97c64d7bf
macros 'LUA_QL'/'LUA_QL' deprecated
10 years ago
Roberto Ierusalimschy
6384475ec4
'luaL_getmetafield' returns type of metafield (instead of a boolean)
10 years ago
Roberto Ierusalimschy
7f1a2ad699
new functions 'lua_geti/lua_seti' (non raw)
10 years ago
Roberto Ierusalimschy
a1ab5ab396
'table.copy' -> 'table.move' + optional parameter moved to the end +
several functions operate on "virtual" tables too
10 years ago
Roberto Ierusalimschy
3ccbae84d2
added some casts between integral types (to avoid warnings)
10 years ago
Roberto Ierusalimschy
03bbe1baf1
first implementation for 'table.copy'
10 years ago
Roberto Ierusalimschy
a9af12bbe7
Table library now respects '__index'/'__newindex' metamethods
10 years ago
Roberto Ierusalimschy
17159b491c
more direct implementation of 'table.pack'
11 years ago
Roberto Ierusalimschy
b390d7c168
detail (avoid "casting down" in case lua_Integer is smaller than int)
11 years ago
Roberto Ierusalimschy
9737832641
'int' -> 'lua_Integer' in several functions
11 years ago
Roberto Ierusalimschy
315c5bf7b7
bug: compiler could optimize away overflow check (+ changing indices
from 'int' to 'lua_Integer')
11 years ago
Roberto Ierusalimschy
da4811238a
details (typos in comments)
11 years ago
Roberto Ierusalimschy
15a3738b49
no need to handle 0 as a special case in 'table.remove'
12 years ago
Roberto Ierusalimschy
f4e762f688
better error checking for 'table.insert' and 'table.remove'
12 years ago
Roberto Ierusalimschy
ece042fef0
'table.pack' does not return 'n' (may be confusing when
using table.pack as last argument in a call)
13 years ago
Roberto Ierusalimschy
50cddefeeb
lint (wrong identation)
13 years ago
Roberto Ierusalimschy
79cbc3468c
removed and deprecated functions really removed from the code base
14 years ago
Roberto Ierusalimschy
ee37ee50d6
'table.pack' also returns 'n' + 'deprecated' changed to 'removed'
14 years ago
Roberto Ierusalimschy
fe0d54d37e
table library respects '#' metamethods
14 years ago
Roberto Ierusalimschy
5b33e39855
removed deprecated functions getn-foreach-foreachi
14 years ago
Roberto Ierusalimschy
4590a89b32
corrected warnings from different compilers (mostly casts and small
details)
14 years ago
Roberto Ierusalimschy
7192afafee
new module policy: C modules do not create globals and do not register
themselves with 'require' (let 'require' do its work); new auxiliary
functions luaL_newlib/luaL_newlibtable/luaL_setfuncs/luaL_requiref.
Old luaL_register will be deprecated.
15 years ago
Roberto Ierusalimschy
489253d753
better definitions for lua_[gs]etglobal + less uses of ENVIRONINDEX
15 years ago
Roberto Ierusalimschy
193ce46970
table.pack was locking last result, avoiding its collection
15 years ago
Roberto Ierusalimschy
0dc09cb42e
'unpack' moved to table library (and therefore "renamed" to
'table.unpack'.
15 years ago