Browse Source

Towards release 5.4.7

Roberto Ierusalimschy 1 year ago
parent
commit
de794a6527
6 changed files with 13 additions and 12 deletions
  1. 1 1
      lgc.c
  2. 3 3
      lua.h
  3. 1 1
      lvm.c
  4. 1 1
      manual/2html
  5. 5 5
      manual/manual.of
  6. 2 1
      testes/pm.lua

+ 1 - 1
lgc.c

@@ -1713,7 +1713,7 @@ static void fullinc (lua_State *L, global_State *g) {
   /* finish any pending sweep phase to start a new cycle */
   luaC_runtilstate(L, bitmask(GCSpause));
   luaC_runtilstate(L, bitmask(GCSpropagate));  /* start new cycle */
-  g->gcstate = GCSenteratomic;  /* go straight to atomic phase ??? */
+  g->gcstate = GCSenteratomic;  /* go straight to atomic phase */
   luaC_runtilstate(L, bitmask(GCScallfin));  /* run up to finalizers */
   /* estimate must be correct after a full GC cycle */
   lua_assert(g->GCestimate == gettotalbytes(g));

+ 3 - 3
lua.h

@@ -13,13 +13,13 @@
 #include <stddef.h>
 
 
-#define LUA_COPYRIGHT	LUA_RELEASE "  Copyright (C) 1994-2023 Lua.org, PUC-Rio"
+#define LUA_COPYRIGHT	LUA_RELEASE "  Copyright (C) 1994-2024 Lua.org, PUC-Rio"
 #define LUA_AUTHORS	"R. Ierusalimschy, L. H. de Figueiredo, W. Celes"
 
 
 #define LUA_VERSION_MAJOR_N	5
 #define LUA_VERSION_MINOR_N	4
-#define LUA_VERSION_RELEASE_N	6
+#define LUA_VERSION_RELEASE_N	7
 
 #define LUA_VERSION_NUM  (LUA_VERSION_MAJOR_N * 100 + LUA_VERSION_MINOR_N)
 #define LUA_VERSION_RELEASE_NUM  (LUA_VERSION_NUM * 100 + LUA_VERSION_RELEASE_N)
@@ -507,7 +507,7 @@ struct lua_Debug {
 
 
 /******************************************************************************
-* Copyright (C) 1994-2023 Lua.org, PUC-Rio.
+* Copyright (C) 1994-2024 Lua.org, PUC-Rio.
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the

+ 1 - 1
lvm.c

@@ -92,7 +92,7 @@ static int l_strton (const TValue *obj, TValue *result) {
   if (!cvt2num(obj))  /* is object not a string? */
     return 0;
   else {
-  TString *st = tsvalue(obj);
+    TString *st = tsvalue(obj);
     return (luaO_str2num(getstr(st), result) == tsslen(st) + 1);
   }
 }

+ 1 - 1
manual/2html

@@ -30,7 +30,7 @@ by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes
 <p>
 <small>
 <a href="http://www.lua.org/copyright.html">Copyright</a>
-&copy; 2023 Lua.org, PUC-Rio.  All rights reserved.
+&copy; 2024 Lua.org, PUC-Rio.  All rights reserved.
 </small>
 <hr>
 

+ 5 - 5
manual/manual.of

@@ -289,7 +289,7 @@ Whenever there is an error,
 an @def{error object}
 is propagated with information about the error.
 Lua itself only generates errors whose error object is a string,
-but programs may generate errors with
+but programs can generate errors with
 any value as the error object.
 It is up to the Lua program or its host to handle such error objects.
 For historical reasons,
@@ -298,7 +298,7 @@ even though it does not have to be a string.
 
 
 When you use @Lid{xpcall} (or @Lid{lua_pcall}, in C)
-you may give a @def{message handler}
+you can give a @def{message handler}
 to be called in case of errors.
 This function is called with the original error object
 and returns a new error object.
@@ -343,7 +343,7 @@ which is then called a @def{metamethod}.
 In the previous example, the key is the string @St{__add}
 and the metamethod is the function that performs the addition.
 Unless stated otherwise,
-a metamethod may in fact be any @x{callable value},
+a metamethod can in fact be any @x{callable value},
 which is either a function or a value with a @idx{__call} metamethod.
 
 You can query the metatable of any value
@@ -1417,7 +1417,7 @@ labels in Lua are considered statements too:
 
 A label is visible in the entire block where it is defined,
 except inside nested functions.
-A goto may jump to any visible label as long as it does not
+A goto can jump to any visible label as long as it does not
 enter into the scope of a local variable.
 A label should not be declared
 where a label with the same name is visible,
@@ -4488,7 +4488,7 @@ but can contain other zeros in its body.
 
 This function can raise memory errors only
 when converting a number to a string
-(as then it has to create a new string).
+(as then it may create a new string).
 
 }
 

+ 2 - 1
testes/pm.lua

@@ -56,7 +56,8 @@ assert(f("  \n\r*&\n\r   xuxu  \n\n", "%g%g%g+") == "xuxu")
 
 -- Adapt a pattern to UTF-8
 local function PU (p)
-  -- break '?' into each individual byte of a character
+  -- reapply '?' into each individual byte of a character.
+  -- (For instance, "á?" becomes "\195?\161?".)
   p = string.gsub(p, "(" .. utf8.charpattern .. ")%?", function (c)
     return string.gsub(c, ".", "%0?")
   end)