Roberto Ierusalimschy
ef789d4161
new global macro 'LUA_MAXUNSIGNED'
11 years ago
Roberto Ierusalimschy
115fa77009
maximum size for dump of integers is size of lua_Integer (which
means that there is no overflows when undumping)
11 years ago
Roberto Ierusalimschy
561030c211
pack/unpack functions renamed dump/undump
11 years ago
Roberto Ierusalimschy
48c745a611
avoid constant overflow when shifting left signed integers until
their last bit
11 years ago
Roberto Ierusalimschy
8ef9117924
fancier way to do sign extension
11 years ago
Roberto Ierusalimschy
420cc62fac
missplelling in comments/function names (endianess -> endianness)
11 years ago
Roberto Ierusalimschy
2d5e2212d4
native lua_Number may be neither float nor double (in pack/unpackfloat)
11 years ago
Roberto Ierusalimschy
da4811238a
details (typos in comments)
11 years ago
Roberto Ierusalimschy
ad40bb1181
detail in string.rep: allow large repetitions of the empty string (no
possibility of overflows)
11 years ago
Roberto Ierusalimschy
6318de80d3
added 'strip' parameter to lua_dump/string.dump
11 years ago
Roberto Ierusalimschy
916bd874ad
added explicit default options to string.pack/unpack functions
11 years ago
Roberto Ierusalimschy
cd848cab6b
first implementation for string.pack/unpackfloat + try not to assume
that chars have 8 bits
11 years ago
Roberto Ierusalimschy
29256e8960
first implementation of string.packint/string.unpackint
11 years ago
Roberto Ierusalimschy
7c4cc505db
added "reasonable" limit for 'string.rep' (otherwise it is too easy
to crash the machine)
12 years ago
Roberto Ierusalimschy
55f566bd22
use lua_Integer for integer parameters to avoid truncation
12 years ago
Roberto Ierusalimschy
c5069528e1
details ('Type* id' -> 'Type *id')
12 years ago
Roberto Ierusalimschy
944709c77b
more definitions to support integer formatting
12 years ago
Roberto Ierusalimschy
53480f1163
details (remove of some extra spaces)
12 years ago
Roberto Ierusalimschy
6625cbecd1
Bug: Some patterns can overflow the C stack, due to recursion
(Took the opportunity to refactor function 'match')
12 years ago
Roberto Ierusalimschy
054c20cd5b
spaces -> tabs in #defines
13 years ago
Roberto Ierusalimschy
048be9cf27
different scheme to check arguments to '%d', '%x', etc. Old scheme
did not work well when lua_Number is an integer.
13 years ago
Roberto Ierusalimschy
462375ba47
'if' to avoid empty 'memcpy' (may be expensive)
13 years ago
Roberto Ierusalimschy
f1d2ac3a98
allow non-integer arguments to integer formats (%d, %x, etc.),
but check range
13 years ago
Roberto Ierusalimschy
5a568a3b01
detail (comment)
13 years ago
Roberto Ierusalimschy
b5bf7d9ef4
'string.format' checks whether values for integer formats are
actually integers
13 years ago
Roberto Ierusalimschy
17526ed2fe
no more errors on accesses to 'string' and strings
14 years ago
Roberto Ierusalimschy
817f8674af
avoid warning about -unsigned value
14 years ago
Roberto Ierusalimschy
c9d1d9f9c6
better way to test overflows with string indices
14 years ago
Roberto Ierusalimschy
ad2531a0ee
more complete (and hopefuly more correct) handling of 'sizeof(char)'
14 years ago
Roberto Ierusalimschy
bad231c481
'LUA_USELONGLONG' -> 'LUA_USE_LONGLONG'
14 years ago
Roberto Ierusalimschy
a25416a8d5
use of 'luaL_tolstring' for option '%s' in 'string.format'
14 years ago
Roberto Ierusalimschy
e7a9c45a48
trying to avoid assumption that sizeof(char)==1
14 years ago
Roberto Ierusalimschy
c4ea0c3b29
detail (cleaning trailing spaces)
14 years ago
Roberto Ierusalimschy
7106c491dd
'sep' argument to 'string.rep' + 'string.rep' preallocates entire
buffer before creating resulting string
14 years ago
Roberto Ierusalimschy
8980c630bf
error when indexing strings with invalid keys
14 years ago
Roberto Ierusalimschy
af119c8b55
official support for floating hexa numerals
14 years ago
Roberto Ierusalimschy
a2eaad5d81
'gfind' was deprecated in 5.1
14 years ago
Roberto Ierusalimschy
24baa919c1
small bug: 'find' did not detect magic chars after a \0 in a pattern
and did a plain search in those cases
14 years ago
Roberto Ierusalimschy
43ec354722
added support for conditional use of %Lg when using long double
14 years ago
Roberto Ierusalimschy
fdd5f2f7a3
comment typos
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
5a7dee0c5d
added class '%g' in patterns (for graphical characters)
15 years ago
Roberto Ierusalimschy
658ea8752b
no need to handle '\0' differently from other control chars in
format '%q'
15 years ago
Roberto Ierusalimschy
fc6203ee43
BUG: 'string.format' may get buffer when there are missing arguments
15 years ago
Roberto Ierusalimschy
4541243355
patterns now accept '\0' as a regular character
15 years ago
Roberto Ierusalimschy
9100f7479a
new implementation for Generic Buffer manipulation (using userdata as
temporary buffer space)
15 years ago
Roberto Ierusalimschy
1fd4c482a0
reorganization of switch in function 'match' (details)
15 years ago
Roberto Ierusalimschy
46f1429936
more options moved from luaconf.h into internal files
15 years ago
Roberto Ierusalimschy
de6fc75d63
several configuration options that do not change often moved out of
luaconf.h and into more internal files
15 years ago