diff -u -r lua-5.3.1/Makefile lua-5.3.2/Makefile --- lua-5.3.1/Makefile 2015-06-02 22:35:35.000000000 -0300 +++ lua-5.3.2/Makefile 2015-11-18 17:00:04.000000000 -0200 @@ -46,7 +46,7 @@ # Lua version and release. V= 5.3 -R= $V.1 +R= $V.2 # Targets start here. all: $(PLAT) diff -u -r lua-5.3.1/README lua-5.3.2/README --- lua-5.3.1/README 2015-06-10 10:01:13.000000000 -0300 +++ lua-5.3.2/README 2015-11-25 15:23:08.000000000 -0200 @@ -1,5 +1,5 @@ -This is Lua 5.3.1, released on 10 Jun 2015. +This is Lua 5.3.2, released on 25 Nov 2015. For installation instructions, license details, and further information about Lua, see doc/readme.html. diff -u -r lua-5.3.1/doc/lua.css lua-5.3.2/doc/lua.css --- lua-5.3.1/doc/lua.css 2015-04-09 14:25:19.000000000 -0300 +++ lua-5.3.2/doc/lua.css 2015-06-27 09:56:17.000000000 -0300 @@ -131,3 +131,29 @@ p.logos a:link:hover, p.logos a:visited:hover { background-color: inherit ; } + +table.book { + border: none ; + border-spacing: 0 ; + border-collapse: collapse ; +} + +table.book td { + padding: 0 ; + vertical-align: top ; +} + +table.book td.cover { + padding-right: 1em ; +} + +table.book img { + border: solid #000080 1px ; +} + +table.book span { + font-size: small ; + text-align: left ; + display: block ; + margin-top: 0.25em ; +} diff -u -r lua-5.3.1/doc/manual.html lua-5.3.2/doc/manual.html --- lua-5.3.1/doc/manual.html 2015-06-10 18:31:16.000000000 -0300 +++ lua-5.3.2/doc/manual.html 2015-11-25 15:19:11.000000000 -0200 @@ -35,7 +35,7 @@
-
+
@@ -398,7 +398,7 @@
using the setmetatable function.
You cannot change the metatable of other types from Lua code
(except by using the debug library (§6.10));
-you must use the C API for that.
+you should use the C API for that.
@@ -589,7 +589,7 @@
the <= (less equal) operation.
Unlike other operations,
-The less-equal operation can use two different events.
+the less-equal operation can use two different events.
First, Lua looks for the "__le" metamethod in both operands,
like in the "lt" operation.
If it cannot find such a metamethod,
@@ -1051,7 +1051,8 @@
(also called identifiers)
in Lua can be any string of letters,
digits, and underscores,
-not beginning with a digit.
+not beginning with a digit and
+not being a reserved word.
Identifiers are used to name variables, table fields, and labels.
@@ -2706,7 +2707,9 @@
lua_upvalueindex(1), and so on.
Any access to lua_upvalueindex(n),
where n is greater than the number of upvalues of the
-current function (but not greater than 256),
+current function
+(but not greater than 256,
+which is one plus the maximum number of upvalues in a closure),
produces an acceptable but invalid index.
@@ -2971,6 +2974,7 @@
The third field, x,
tells whether the function may raise errors:
'-' means the function never raises any error;
+'m' means the function may raise memory errors;
'e' means the function may raise errors;
'v' means the function may raise an error on purpose.
@@ -3143,7 +3147,8 @@
The number of results is adjusted to nresults,
unless nresults is LUA_MULTRET.
In this case, all results from the function are pushed.
-Lua takes care that the returned values fit into the stack space.
+Lua takes care that the returned values fit into the stack space,
+but it does not ensure any extra space in the stack.
The function results are pushed onto the stack in direct order
(the first result is pushed first),
so that after the call the last result is on the top of the stack.
@@ -3253,14 +3258,15 @@
int lua_checkstack (lua_State *L, int n);
-Ensures that the stack has space for at least n extra slots.
+Ensures that the stack has space for at least n extra slots
+(that is, that you can safely push up to n values into it).
It returns false if it cannot fulfill the request,
either because it would cause the stack
to be larger than a fixed maximum size
(typically at least several thousand elements) or
because it cannot allocate memory for the extra space.
This function never shrinks the stack;
-if the stack is already larger than the new size,
+if the stack already has space for the extra slots,
it is left unchanged.
@@ -3345,7 +3351,7 @@
lua_createtable-[-0, +1, e] +[-0, +1, m]
void lua_createtable (lua_State *L, int narr, int nrec);
@@ -3355,7 +3361,7 @@
parameter nrec is a hint for how many other elements
the table will have.
Lua may use these hints to preallocate memory for the new table.
-This pre-allocation is useful for performance when you know in advance
+This preallocation is useful for performance when you know in advance
how many elements the table will have.
Otherwise you can use the function lua_newtable.
@@ -3364,7 +3370,7 @@
lua_dump-[-0, +0, e] +[-0, +0, –]
int lua_dump (lua_State *L,
lua_Writer writer,
void *data,
@@ -3978,7 +3984,7 @@
lua_newtable
-[-0, +1, e]
+[-0, +1, m]
void lua_newtable (lua_State *L);
@@ -3990,7 +3996,7 @@
lua_newthread
-[-0, +1, e]
+[-0, +1, m]
lua_State *lua_newthread (lua_State *L);
@@ -4011,7 +4017,7 @@
lua_newuserdata
-[-0, +1, e]
+[-0, +1, m]
void *lua_newuserdata (lua_State *L, size_t size);
@@ -4221,7 +4227,7 @@
lua_pushcclosure
-[-n, +1, e]
+[-n, +1, m]
void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n);
@@ -4278,7 +4284,7 @@
lua_pushfstring
-[-0, +1, e]
+[-0, +1, m]
const char *lua_pushfstring (lua_State *L, const char *fmt, ...);
@@ -4358,7 +4364,7 @@
lua_pushliteral
-[-0, +1, e]
+[-0, +1, m]
const char *lua_pushliteral (lua_State *L, const char *s);
@@ -4370,7 +4376,7 @@
lua_pushlstring
-[-0, +1, e]
+[-0, +1, m]
const char *lua_pushlstring (lua_State *L, const char *s, size_t len);
@@ -4413,7 +4419,7 @@
lua_pushstring
-[-0, +1, e]
+[-0, +1, m]
const char *lua_pushstring (lua_State *L, const char *s);
@@ -4460,7 +4466,7 @@
lua_pushvfstring
-[-0, +1, e]
+[-0, +1, m]
const char *lua_pushvfstring (lua_State *L,
const char *fmt,
va_list argp);
@@ -4555,7 +4561,7 @@
lua_rawset
-[-2, +0, e]
+[-2, +0, m]
void lua_rawset (lua_State *L, int index);
@@ -4567,7 +4573,7 @@
lua_rawseti
-[-1, +0, e]
+[-1, +0, m]
void lua_rawseti (lua_State *L, int index, lua_Integer i);
@@ -4586,7 +4592,7 @@
lua_rawsetp
-[-1, +0, e]
+[-1, +0, m]
void lua_rawsetp (lua_State *L, int index, const void *p);
@@ -4989,13 +4995,13 @@
lua_tolstring
-[-0, +0, e]
+[-0, +0, m]
const char *lua_tolstring (lua_State *L, int index, size_t *len);
Converts the Lua value at the given index to a C string.
If len is not NULL,
-it also sets *len with the string length.
+it sets *len with the string length.
The Lua value must be a string or a number;
otherwise, the function returns NULL.
If the value is a number,
@@ -5006,7 +5012,7 @@
-lua_tolstring returns a fully aligned pointer
+lua_tolstring returns a pointer
to a string inside the Lua state.
This string always has a zero ('\0')
after its last character (as in C),
@@ -5075,7 +5081,7 @@
lua_tostring
-[-0, +0, e]
+[-0, +0, m]
const char *lua_tostring (lua_State *L, int index);
@@ -5884,7 +5890,7 @@
luaL_addchar
-[-?, +?, e]
+[-?, +?, m]
void luaL_addchar (luaL_Buffer *B, char c);
@@ -5896,7 +5902,7 @@
luaL_addlstring
-[-?, +?, e]
+[-?, +?, m]
void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l);
@@ -5910,7 +5916,7 @@
luaL_addsize
-[-?, +?, e]
+[-?, +?, –]
void luaL_addsize (luaL_Buffer *B, size_t n);
@@ -5923,7 +5929,7 @@
luaL_addstring
-[-?, +?, e]
+[-?, +?, m]
void luaL_addstring (luaL_Buffer *B, const char *s);
@@ -5936,7 +5942,7 @@
luaL_addvalue
-[-1, +?, e]
+[-1, +?, m]
void luaL_addvalue (luaL_Buffer *B);
@@ -6074,7 +6080,7 @@
luaL_buffinitsize
-[-?, +?, e]
+[-?, +?, m]
char *luaL_buffinitsize (lua_State *L, luaL_Buffer *B, size_t sz);
@@ -6325,7 +6331,7 @@
luaL_execresult
-[-0, +3, e]
+[-0, +3, m]
int luaL_execresult (lua_State *L, int stat);
@@ -6338,7 +6344,7 @@
luaL_fileresult
-[-0, +(1|3), e]
+[-0, +(1|3), m]
int luaL_fileresult (lua_State *L, int stat, const char *fname);
@@ -6351,7 +6357,7 @@
luaL_getmetafield
-[-0, +(0|1), e]
+[-0, +(0|1), m]
int luaL_getmetafield (lua_State *L, int obj, const char *e);
@@ -6366,7 +6372,7 @@
luaL_getmetatable
-[-0, +1, –]
+[-0, +1, m]
int luaL_getmetatable (lua_State *L, const char *tname);
@@ -6396,7 +6402,7 @@
luaL_gsub
-[-0, +1, e]
+[-0, +1, m]
const char *luaL_gsub (lua_State *L,
const char *s,
const char *p,
@@ -6531,7 +6537,7 @@
luaL_newlib
-[-0, +1, e]
+[-0, +1, m]
void luaL_newlib (lua_State *L, const luaL_Reg l[]);
@@ -6553,7 +6559,7 @@
luaL_newlibtable
-[-0, +1, e]
+[-0, +1, m]
void luaL_newlibtable (lua_State *L, const luaL_Reg l[]);
@@ -6574,7 +6580,7 @@
luaL_newmetatable
-[-0, +1, e]
+[-0, +1, m]
int luaL_newmetatable (lua_State *L, const char *tname);
@@ -6664,6 +6670,9 @@
If l is not NULL,
fills the position *l with the result's length.
+If the result is NULL
+(only possible when returning d and d == NULL),
+its length is considered zero.
@@ -6702,7 +6711,7 @@
luaL_prepbuffer
-[-?, +?, e]
+[-?, +?, m]
char *luaL_prepbuffer (luaL_Buffer *B);
@@ -6714,7 +6723,7 @@
luaL_prepbuffsize
-[-?, +?, e]
+[-?, +?, m]
char *luaL_prepbuffsize (luaL_Buffer *B, size_t sz);
@@ -6730,7 +6739,7 @@
luaL_pushresult
-[-?, +1, e]
+[-?, +1, m]
void luaL_pushresult (luaL_Buffer *B);
@@ -6742,7 +6751,7 @@
luaL_pushresultsize
-[-?, +1, e]
+[-?, +1, m]
void luaL_pushresultsize (luaL_Buffer *B, size_t sz);
@@ -6753,7 +6762,7 @@
luaL_ref
-[-1, +0, e]
+[-1, +0, m]
int luaL_ref (lua_State *L, int t);
@@ -6824,7 +6833,7 @@
luaL_setfuncs
-[-nup, +0, e]
+[-nup, +0, m]
void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup);
@@ -6888,7 +6897,7 @@
must return either true (in case of success)
or nil plus an error message (in case of error).
Once Lua calls this field,
-the field value is changed to NULL
+it changes the field value to NULL
to signal that the handle is closed.
@@ -6896,7 +6905,7 @@
luaL_testudata
-[-0, +0, e]
+[-0, +0, m]
void *luaL_testudata (lua_State *L, int arg, const char *tname);
@@ -6932,7 +6941,7 @@
luaL_traceback
-[-0, +1, e]
+[-0, +1, m]
void luaL_traceback (lua_State *L, lua_State *L1, const char *msg,
int level);
@@ -6979,7 +6988,7 @@
luaL_where
-[-0, +1, e]
+[-0, +1, m]
void luaL_where (lua_State *L, int lvl);
@@ -7476,7 +7485,8 @@
Sets the metatable for the given table.
-(You cannot change the metatable of other types from Lua, only from C.)
+(To change the metatable of other types from Lua code,
+you must use the debug library (§6.10).)
If metatable is nil,
removes the metatable of the given table.
If the original metatable has a "__metatable" field,
@@ -7557,8 +7567,11 @@
_VERSION
+
+
+
A global variable (not a function) that
-holds a string containing the current interpreter version.
+holds a string containing the running Lua version.
The current value of this variable is "Lua 5.3".
@@ -8194,9 +8207,11 @@
i, o, u, X, and x
expect an integer.
Option q expects a string.
-Option s expects a string without embedded zeros;
+Option s expects a string;
if its argument is not a string,
it is converted to one following the same rules of tostring.
+If the option has any modifier (flags, width, length),
+the string argument should not contain embedded zeros.
@@ -8392,6 +8407,11 @@
Returns the empty string if n is not positive.
+
+(Note that it is very easy to exhaust the memory of your machine
+with a single call to this function.)
+
+
@@ -8963,14 +8983,23 @@
then it must be a function that receives two list elements
and returns true when the first element must come
before the second in the final order
-(so that not comp(list[i+1],list[i]) will be true after the sort).
+(so that, after the sort,
+i < j implies not comp(list[j],list[i])).
If comp is not given,
then the standard Lua operator < is used instead.
+Note that the comp function must define
+a strict partial order over the elements in the list;
+that is, it must be asymmetric and transitive.
+Otherwise, no valid sort may be possible.
+
+
+
The sort algorithm is not stable;
-that is, elements considered equal by the given order
+that is, elements not comparable by the given order
+(e.g., equal elements)
may have their relative positions changed by the sort.
@@ -9222,14 +9251,13 @@
When called with two integers m and n,
math.random returns a pseudo-random integer
with uniform distribution in the range [m, n].
-(The value m-n cannot be negative and must fit in a Lua integer.)
+(The value n-m cannot be negative and must fit in a Lua integer.)
The call math.random(n) is equivalent to math.random(1,n).
This function is an interface to the underling
pseudo-random generator function provided by C.
-No guarantees can be given for its statistical properties.
@@ -9397,7 +9425,7 @@
-
io.lines ([filename ···])
+
io.lines ([filename, ···])
@@ -9771,7 +9799,7 @@
After this optional character,
if format is the string "*t",
then date returns a table with the following fields:
-year (four digits), month (1–12), day (1–31),
+year, month (1–12), day (1–31),
hour (0–23), min (0–59), sec (0–61),
wday (weekday, Sunday is 1),
yday (day of the year),
@@ -9789,8 +9817,8 @@
When called without arguments,
date returns a reasonable date and time representation that depends on
-the host system and on the current locale
-(that is, os.date() is equivalent to os.date("%c")).
+the host system and on the current locale.
+(More specifically, os.date() is equivalent to os.date("%c").)
@@ -10797,10 +10825,10 @@