aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-04-26 14:55:18 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-04-26 14:55:18 -0300
commitde794a6527058e75b674118b35f39dcbb13e88b1 (patch)
tree3699604543f09398d7aa62729309c3685354ed83
parent8b83417de982d068bd92e0428a42ca0cdd909789 (diff)
downloadlua-de794a6527058e75b674118b35f39dcbb13e88b1.tar.gz
lua-de794a6527058e75b674118b35f39dcbb13e88b1.tar.bz2
lua-de794a6527058e75b674118b35f39dcbb13e88b1.zip
Towards release 5.4.7
-rw-r--r--lgc.c2
-rw-r--r--lua.h6
-rw-r--r--lvm.c2
-rwxr-xr-xmanual/2html2
-rw-r--r--manual/manual.of10
-rw-r--r--testes/pm.lua3
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) {
1713 /* finish any pending sweep phase to start a new cycle */ 1713 /* finish any pending sweep phase to start a new cycle */
1714 luaC_runtilstate(L, bitmask(GCSpause)); 1714 luaC_runtilstate(L, bitmask(GCSpause));
1715 luaC_runtilstate(L, bitmask(GCSpropagate)); /* start new cycle */ 1715 luaC_runtilstate(L, bitmask(GCSpropagate)); /* start new cycle */
1716 g->gcstate = GCSenteratomic; /* go straight to atomic phase ??? */ 1716 g->gcstate = GCSenteratomic; /* go straight to atomic phase */
1717 luaC_runtilstate(L, bitmask(GCScallfin)); /* run up to finalizers */ 1717 luaC_runtilstate(L, bitmask(GCScallfin)); /* run up to finalizers */
1718 /* estimate must be correct after a full GC cycle */ 1718 /* estimate must be correct after a full GC cycle */
1719 lua_assert(g->GCestimate == gettotalbytes(g)); 1719 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 @@
13#include <stddef.h> 13#include <stddef.h>
14 14
15 15
16#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2023 Lua.org, PUC-Rio" 16#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2024 Lua.org, PUC-Rio"
17#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes" 17#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes"
18 18
19 19
20#define LUA_VERSION_MAJOR_N 5 20#define LUA_VERSION_MAJOR_N 5
21#define LUA_VERSION_MINOR_N 4 21#define LUA_VERSION_MINOR_N 4
22#define LUA_VERSION_RELEASE_N 6 22#define LUA_VERSION_RELEASE_N 7
23 23
24#define LUA_VERSION_NUM (LUA_VERSION_MAJOR_N * 100 + LUA_VERSION_MINOR_N) 24#define LUA_VERSION_NUM (LUA_VERSION_MAJOR_N * 100 + LUA_VERSION_MINOR_N)
25#define LUA_VERSION_RELEASE_NUM (LUA_VERSION_NUM * 100 + LUA_VERSION_RELEASE_N) 25#define LUA_VERSION_RELEASE_NUM (LUA_VERSION_NUM * 100 + LUA_VERSION_RELEASE_N)
@@ -507,7 +507,7 @@ struct lua_Debug {
507 507
508 508
509/****************************************************************************** 509/******************************************************************************
510* Copyright (C) 1994-2023 Lua.org, PUC-Rio. 510* Copyright (C) 1994-2024 Lua.org, PUC-Rio.
511* 511*
512* Permission is hereby granted, free of charge, to any person obtaining 512* Permission is hereby granted, free of charge, to any person obtaining
513* a copy of this software and associated documentation files (the 513* 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) {
92 if (!cvt2num(obj)) /* is object not a string? */ 92 if (!cvt2num(obj)) /* is object not a string? */
93 return 0; 93 return 0;
94 else { 94 else {
95 TString *st = tsvalue(obj); 95 TString *st = tsvalue(obj);
96 return (luaO_str2num(getstr(st), result) == tsslen(st) + 1); 96 return (luaO_str2num(getstr(st), result) == tsslen(st) + 1);
97 } 97 }
98} 98}
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
30<p> 30<p>
31<small> 31<small>
32<a href="http://www.lua.org/copyright.html">Copyright</a> 32<a href="http://www.lua.org/copyright.html">Copyright</a>
33&copy; 2023 Lua.org, PUC-Rio. All rights reserved. 33&copy; 2024 Lua.org, PUC-Rio. All rights reserved.
34</small> 34</small>
35<hr> 35<hr>
36 36
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,
289an @def{error object} 289an @def{error object}
290is propagated with information about the error. 290is propagated with information about the error.
291Lua itself only generates errors whose error object is a string, 291Lua itself only generates errors whose error object is a string,
292but programs may generate errors with 292but programs can generate errors with
293any value as the error object. 293any value as the error object.
294It is up to the Lua program or its host to handle such error objects. 294It is up to the Lua program or its host to handle such error objects.
295For historical reasons, 295For historical reasons,
@@ -298,7 +298,7 @@ even though it does not have to be a string.
298 298
299 299
300When you use @Lid{xpcall} (or @Lid{lua_pcall}, in C) 300When you use @Lid{xpcall} (or @Lid{lua_pcall}, in C)
301you may give a @def{message handler} 301you can give a @def{message handler}
302to be called in case of errors. 302to be called in case of errors.
303This function is called with the original error object 303This function is called with the original error object
304and returns a new error object. 304and returns a new error object.
@@ -343,7 +343,7 @@ which is then called a @def{metamethod}.
343In the previous example, the key is the string @St{__add} 343In the previous example, the key is the string @St{__add}
344and the metamethod is the function that performs the addition. 344and the metamethod is the function that performs the addition.
345Unless stated otherwise, 345Unless stated otherwise,
346a metamethod may in fact be any @x{callable value}, 346a metamethod can in fact be any @x{callable value},
347which is either a function or a value with a @idx{__call} metamethod. 347which is either a function or a value with a @idx{__call} metamethod.
348 348
349You can query the metatable of any value 349You can query the metatable of any value
@@ -1417,7 +1417,7 @@ labels in Lua are considered statements too:
1417 1417
1418A label is visible in the entire block where it is defined, 1418A label is visible in the entire block where it is defined,
1419except inside nested functions. 1419except inside nested functions.
1420A goto may jump to any visible label as long as it does not 1420A goto can jump to any visible label as long as it does not
1421enter into the scope of a local variable. 1421enter into the scope of a local variable.
1422A label should not be declared 1422A label should not be declared
1423where a label with the same name is visible, 1423where a label with the same name is visible,
@@ -4488,7 +4488,7 @@ but can contain other zeros in its body.
4488 4488
4489This function can raise memory errors only 4489This function can raise memory errors only
4490when converting a number to a string 4490when converting a number to a string
4491(as then it has to create a new string). 4491(as then it may create a new string).
4492 4492
4493} 4493}
4494 4494
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")
56 56
57-- Adapt a pattern to UTF-8 57-- Adapt a pattern to UTF-8
58local function PU (p) 58local function PU (p)
59 -- break '?' into each individual byte of a character 59 -- reapply '?' into each individual byte of a character.
60 -- (For instance, "รก?" becomes "\195?\161?".)
60 p = string.gsub(p, "(" .. utf8.charpattern .. ")%?", function (c) 61 p = string.gsub(p, "(" .. utf8.charpattern .. ")%?", function (c)
61 return string.gsub(c, ".", "%0?") 62 return string.gsub(c, ".", "%0?")
62 end) 63 end)