diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-06-18 11:07:27 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-06-18 11:07:27 -0300 |
commit | c33b1728aeb7dfeec4013562660e07d32697aa6b (patch) | |
tree | 0aebcad8875f137b63b4593d8e66a956c21e035b | |
parent | a304199836ef37af6912a1da6f9b6cad33466a84 (diff) | |
download | lua-github-5.4.0.tar.gz |
Added as incompatibility, in the manual, the extra return of 'io.lines'.
-rw-r--r-- | lundump.c | 4 | ||||
-rw-r--r-- | manual/manual.of | 11 |
2 files changed, 13 insertions, 2 deletions
@@ -26,7 +26,7 @@ #if !defined(luai_verifycode) -#define luai_verifycode(L,b,f) /* empty */ +#define luai_verifycode(L,f) /* empty */ #endif @@ -317,7 +317,7 @@ LClosure *luaU_undump(lua_State *L, ZIO *Z, const char *name) { luaC_objbarrier(L, cl, cl->p); loadFunction(&S, cl->p, NULL); lua_assert(cl->nupvalues == cl->p->sizeupvalues); - luai_verifycode(L, buff, cl->p); + luai_verifycode(L, cl->p); return cl; } diff --git a/manual/manual.of b/manual/manual.of index 4d1794fc..9c275d15 100644 --- a/manual/manual.of +++ b/manual/manual.of @@ -9116,6 +9116,17 @@ of the function @Lid{collectgarbage} are deprecated. You should use the new option @St{incremental} to set them. } +@item{ +The function @Lid{io.lines} now returns four values, +instead of just one. +That can be a problem when it is used as the sole +argument to another function that has optional parameters, +such as in @T{load(io.lines(filename, "L"))}. +To fix that issue, +you can wrap the call into parentheses, +to adjust its number of results to one. +} + } } |