Commit Graph

257 Commits

Author SHA1 Message Date
Roberto Ierusalimschy
063d4e4543 Lua 5.3.5 ported to git
This is the first commit for the branch Lua 5.3. All source files
were copied from the official distribution of 5.3.5 in the Lua site.
The test files are the same of 5.3.4. The manual came from the
previous RCS repository, revision 1.167.1.2.
2018-12-17 14:46:37 -02:00
Roberto Ierusalimschy
7b1fba69b7 using 'lastfree == NULL' to signal that table is using the dummy
node for its hash part + new macro 'allocsizenode'
2016-11-07 10:38:35 -02:00
Roberto Ierusalimschy
d103312661 details (typos in comments) 2015-11-19 17:16:22 -02:00
Roberto Ierusalimschy
5100bc8aa1 no need for a special case to get long strings (not that common) 2015-11-03 16:35:21 -02:00
Roberto Ierusalimschy
7485512384 added comment and assert about dead keys 2015-11-03 16:10:44 -02:00
Roberto Ierusalimschy
46de77b219 bug: despite its name, 'luaH_getstr' did not work for strings in
general, but only for short strings
2015-11-03 13:47:30 -02:00
Roberto Ierusalimschy
8950e0c049 avoid possibility of subtle arith. overflow 2015-07-04 13:32:34 -03:00
Roberto Ierusalimschy
2de3361c6c detail 2015-07-01 14:47:12 -03:00
Roberto Ierusalimschy
cbef15f3ea comment (FALLTHROUGH position) 2015-06-09 11:21:13 -03:00
Roberto Ierusalimschy
a71c0ab861 detail (removed useless '#include') 2015-05-20 13:22:30 -03:00
Roberto Ierusalimschy
65ac789565 detail (comment) 2015-04-02 18:09:51 -03:00
Roberto Ierusalimschy
63720a4290 janitor work (comments, variable names, some other details) 2015-03-30 16:51:00 -03:00
Roberto Ierusalimschy
3a91274547 details (avoid 'lint' warnings) 2015-03-30 12:42:59 -03:00
Roberto Ierusalimschy
a00013c8d0 'point2int' -> 'point2uint' (to reflect its actual result type) 2015-03-03 16:53:13 -03:00
Roberto Ierusalimschy
81245b1ad5 'numisinteger' (for table keys) replaced by 'luaV_tointeger' (old
'tointeger_aux'), which can do the same job.
2015-02-20 12:27:53 -02:00
Roberto Ierusalimschy
397ce11996 make 'hashfloat' configurable 2015-02-20 12:05:01 -02:00
Roberto Ierusalimschy
419e2cb01d detail (file does not need 'string.h') 2015-02-16 11:15:00 -02:00
Roberto Ierusalimschy
e0306e386f some changes in 'hashfloat' to avoid undefined (in ISO C) numerical
conversions
2015-02-13 11:05:34 -02:00
Roberto Ierusalimschy
7e2015a46d size of short strings stored in a single byte, to reduce the size
of struct 'TString'
2015-01-16 14:54:37 -02:00
Roberto Ierusalimschy
3c55790ebe 'setkey' -> 'setnodekey' (to avoid conflicts with POSIX) 2015-01-05 11:52:37 -02:00
Roberto Ierusalimschy
28fdbcf393 added include for 'lprefix.h', for stuff that must be added before
any other header file
2014-11-02 17:19:04 -02:00
Roberto Ierusalimschy
bdf566a8a3 `name' in comments changed to 'name' 2014-10-25 09:50:46 -02:00
Roberto Ierusalimschy
463edee2fd 'lua_numtointeger' -> 'lua_numbertointeger' 2014-10-24 09:42:06 -02:00
Roberto Ierusalimschy
f97c64d7bf macros 'LUA_QL'/'LUA_QL' deprecated 2014-10-17 13:28:21 -03:00
Roberto Ierusalimschy
3a15c7ce43 size for array part of a table ('sizearray') changed from 'int' to
'unsigned int', which allows twice as many elements in the array part
2014-09-04 15:15:29 -03:00
Roberto Ierusalimschy
f5c690b684 details in comments 2014-08-01 14:24:02 -03:00
Roberto Ierusalimschy
07c7fdb9df simpler definition for 'setobj' (trust the compiler for the assignment) 2014-07-29 13:22:24 -03:00
Roberto Ierusalimschy
ca41b43f53 type 'TString' refers directly to the structure inside the union
(union used only for size purposes)
2014-07-18 10:36:14 -03:00
Roberto Ierusalimschy
c94f11d783 'IntPoint' -> 'point2int' + ensure that casted value fits in
destination type
2014-06-26 13:17:35 -03:00
Roberto Ierusalimschy
14929f5764 use appropriate macros to convert GCObject to specific types 2014-06-18 19:59:29 -03:00
Roberto Ierusalimschy
c98f195eb9 function 'luaV_numtointeger' changed to a global macro
'lua_numtointeger' (tricky, small, and useful in several places)
2014-05-26 14:10:22 -03:00
Roberto Ierusalimschy
037a70dfea cast_u2s/cast_s2u renamed l_castS2U/l_castU2S to be configurable from
outside (mostly for testing)
2014-04-15 13:32:49 -03:00
Roberto Ierusalimschy
8f961da3db macros cast_integer/cast_unsigned replaced by cast_u2s/cast_s2u, that
should be used only between lua_Integer and lua_Unsigned
2014-04-15 11:29:30 -03:00
Roberto Ierusalimschy
675530c4d8 maximum size of array part of a table now is restricted not only by
the size of an 'int', but also by the size of a 'lua_Integer'
2014-04-13 18:11:19 -03:00
Roberto Ierusalimschy
607be77ec8 some details to avoid warnings 2014-04-01 11:39:55 -03:00
Roberto Ierusalimschy
86dd8bf3f5 no more 'L' in macros "luai_num*" (several places that use those macros
cannot throw errors anyway...)
2014-01-27 11:34:32 -02:00
Roberto Ierusalimschy
1150873447 'luaC_newobj' does not handle special cases; only special case
now is threads, which do not use 'luaC_newobj' anymore.
2013-09-11 09:26:14 -03:00
Roberto Ierusalimschy
26629d0af1 details (a few casts moved from macro invocation to macro definition) 2013-08-29 10:49:57 -03:00
Roberto Ierusalimschy
9a871dd3db tables and userdata all go to local list, too 2013-08-28 15:30:26 -03:00
Roberto Ierusalimschy
90972ff136 LOCALBLACK changed to LOCALMARK and used also to control whether object
is in 'localgc' list + luaC_newobj by default puts object in 'localgc'
list
2013-08-27 17:04:00 -03:00
Roberto Ierusalimschy
caceeab750 'next' field for tables changed from pointer to integer (for better
alignment on 64-bit machines)
2013-08-18 13:12:18 -03:00
Roberto Ierusalimschy
453450d687 new macro 'l_floor' (allows 'floorf' even when other math operations
do not have an 'f' variant)
2013-06-20 12:02:49 -03:00
Roberto Ierusalimschy
188192ce9a 'luai_hashnum' "inlined" into 'hashfloat' 2013-05-29 11:05:03 -03:00
Roberto Ierusalimschy
d630daca1a "legal" way to convert a float to an integer in C 2013-05-27 09:43:37 -03:00
Roberto Ierusalimschy
88bf2f83c0 new function 'tointeger' + 'luaV_arith' replaced by 'luaT_trybinTM' 2013-04-29 14:12:50 -03:00
Roberto Ierusalimschy
d4e6b75098 "integer" keys in tables are now lua_Integer, not 'int'. 2013-04-26 12:39:25 -03:00
Roberto Ierusalimschy
07f861385e first steps in the support of integers: basic representation + table indexing + basic API ops (tointeger/pushinteger) + equality + a few extra stuff 2013-04-15 12:44:46 -03:00
Roberto Ierusalimschy
8287a0db55 detail 2012-09-11 16:37:16 -03:00
Roberto Ierusalimschy
054c20cd5b spaces -> tabs in #defines 2012-05-23 12:37:09 -03:00
Roberto Ierusalimschy
678c1255c9 random seed used in the hash of all strings to avoid intentional
collisions
2012-02-01 19:57:15 -02:00