From de794a6527058e75b674118b35f39dcbb13e88b1 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 26 Apr 2024 14:55:18 -0300 Subject: Towards release 5.4.7 --- lgc.c | 2 +- lua.h | 6 +++--- lvm.c | 2 +- manual/2html | 2 +- manual/manual.of | 10 +++++----- testes/pm.lua | 3 ++- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/lgc.c b/lgc.c index 253a2892..5817f9ee 100644 --- a/lgc.c +++ b/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)); diff --git a/lua.h b/lua.h index 040cc8e4..41a4bf8c 100644 --- a/lua.h +++ b/lua.h @@ -13,13 +13,13 @@ #include -#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 diff --git a/lvm.c b/lvm.c index 918ae64c..fcd24e11 100644 --- a/lvm.c +++ b/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); } } diff --git a/manual/2html b/manual/2html index 43fd8913..4a3e5771 100755 --- a/manual/2html +++ b/manual/2html @@ -30,7 +30,7 @@ by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes

Copyright -© 2023 Lua.org, PUC-Rio. All rights reserved. +© 2024 Lua.org, PUC-Rio. All rights reserved.


diff --git a/manual/manual.of b/manual/manual.of index cef3e22a..b68d41c9 100644 --- a/manual/manual.of +++ b/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). } diff --git a/testes/pm.lua b/testes/pm.lua index 44454dff..e5e3f7a7 100644 --- a/testes/pm.lua +++ b/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) -- cgit v1.2.3-55-g6feb