lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




Le jeu. 30 mai 2019 à 02:38, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> a écrit :
Lua 5.4.0 (alpha-rc1) is now available for testing at
        http://www.lua.org/work/lua-5.4.0-alpha-rc1.tar.gz

The checksums are
        MD5     56f18a477f5a962eeca4d5bb0ccad34b  -
        SHA1    def2b1be4c0a4eaab8afd25c8ba87f6a42074f3b  -

This is an alpha version. Some details may change in the final version.

The main changes in Lua 5.4.0 are listed at
        http://www.lua.org/work/doc/#changes

An updated reference manual is included and also available at
        http://www.lua.org/work/doc

The complete diffs from work2 to alpha are available at
        http://www.lua.org/work/diffs-lua-5.4.0-work2-alpha.html
        http://www.lua.org/work/diffu-lua-5.4.0-work2-alpha.html

If your platform is a common Unix-like platform, just do
        make guess
The Makefile will guess your platform using uname and build Lua for it.

All feedback welcome. Thanks.

find in attachment some fixes for minor issues (found with a linter).

François

 
--lhf

missing static

diff --git a/src/ldebug.c b/src/ldebug.c
--- a/src/ldebug.c
+++ b/src/ldebug.c
@@ -525,8 +525,8 @@
 }
 
 
- const char *getobjname (const Proto *p, int lastpc, int reg,
-                         const char **name) {
+static const char *getobjname (const Proto *p, int lastpc, int reg,
+                               const char **name) {
   int pc;
   *name = luaF_getlocalname(p, reg + 1, lastpc);
   if (*name)  /* is a local? */
-- 

fix indentation

diff --git a/src/lstring.c b/src/lstring.c
--- a/src/lstring.c
+++ b/src/lstring.c
@@ -121,8 +121,8 @@
   int i, j;
   for (i = 0; i < STRCACHE_N; i++)
     for (j = 0; j < STRCACHE_M; j++) {
-    if (iswhite(g->strcache[i][j]))  /* will entry be collected? */
-      g->strcache[i][j] = g->memerrmsg;  /* replace it with something fixed */
+      if (iswhite(g->strcache[i][j]))  /* will entry be collected? */
+        g->strcache[i][j] = g->memerrmsg;  /* replace it with something fixed */
     }
 }
 
-- 

fallthrough comment

diff --git a/src/ldebug.c b/src/ldebug.c
--- a/src/ldebug.c
+++ b/src/ldebug.c
@@ -373,7 +373,7 @@
           ar->ftransfer = ci->u2.transferinfo.ftransfer;
           ar->ntransfer = ci->u2.transferinfo.ntransfer;
         }
-      }
+      } /* FALLTHROUGH */
       case 'L':
       case 'f':  /* handled by lua_getinfo */
         break;
--