2
0
Эх сурвалжийг харах

Details

Added as incompatibility, in the manual, the extra return of 'io.lines'.
Roberto Ierusalimschy 5 жил өмнө
parent
commit
c33b1728ae
2 өөрчлөгдсөн 13 нэмэгдсэн , 2 устгасан
  1. 2 2
      lundump.c
  2. 11 0
      manual/manual.of

+ 2 - 2
lundump.c

@@ -26,7 +26,7 @@
 
 
 
 
 #if !defined(luai_verifycode)
 #if !defined(luai_verifycode)
-#define luai_verifycode(L,b,f)  /* empty */
+#define luai_verifycode(L,f)  /* empty */
 #endif
 #endif
 
 
 
 
@@ -317,7 +317,7 @@ LClosure *luaU_undump(lua_State *L, ZIO *Z, const char *name) {
   luaC_objbarrier(L, cl, cl->p);
   luaC_objbarrier(L, cl, cl->p);
   loadFunction(&S, cl->p, NULL);
   loadFunction(&S, cl->p, NULL);
   lua_assert(cl->nupvalues == cl->p->sizeupvalues);
   lua_assert(cl->nupvalues == cl->p->sizeupvalues);
-  luai_verifycode(L, buff, cl->p);
+  luai_verifycode(L, cl->p);
   return cl;
   return cl;
 }
 }
 
 

+ 11 - 0
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.
 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.
+}
+
 }
 }
 
 
 }
 }