diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-04-26 14:55:18 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-04-26 14:55:18 -0300 |
| commit | de794a6527058e75b674118b35f39dcbb13e88b1 (patch) | |
| tree | 3699604543f09398d7aa62729309c3685354ed83 | |
| parent | 8b83417de982d068bd92e0428a42ca0cdd909789 (diff) | |
| download | lua-de794a6527058e75b674118b35f39dcbb13e88b1.tar.gz lua-de794a6527058e75b674118b35f39dcbb13e88b1.tar.bz2 lua-de794a6527058e75b674118b35f39dcbb13e88b1.zip | |
Towards release 5.4.7
| -rw-r--r-- | lgc.c | 2 | ||||
| -rw-r--r-- | lua.h | 6 | ||||
| -rw-r--r-- | lvm.c | 2 | ||||
| -rwxr-xr-x | manual/2html | 2 | ||||
| -rw-r--r-- | manual/manual.of | 10 | ||||
| -rw-r--r-- | testes/pm.lua | 3 |
6 files changed, 13 insertions, 12 deletions
| @@ -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)); |
| @@ -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 |
| @@ -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 | © 2023 Lua.org, PUC-Rio. All rights reserved. | 33 | © 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, | |||
| 289 | an @def{error object} | 289 | an @def{error object} |
| 290 | is propagated with information about the error. | 290 | is propagated with information about the error. |
| 291 | Lua itself only generates errors whose error object is a string, | 291 | Lua itself only generates errors whose error object is a string, |
| 292 | but programs may generate errors with | 292 | but programs can generate errors with |
| 293 | any value as the error object. | 293 | any value as the error object. |
| 294 | It is up to the Lua program or its host to handle such error objects. | 294 | It is up to the Lua program or its host to handle such error objects. |
| 295 | For historical reasons, | 295 | For historical reasons, |
| @@ -298,7 +298,7 @@ even though it does not have to be a string. | |||
| 298 | 298 | ||
| 299 | 299 | ||
| 300 | When you use @Lid{xpcall} (or @Lid{lua_pcall}, in C) | 300 | When you use @Lid{xpcall} (or @Lid{lua_pcall}, in C) |
| 301 | you may give a @def{message handler} | 301 | you can give a @def{message handler} |
| 302 | to be called in case of errors. | 302 | to be called in case of errors. |
| 303 | This function is called with the original error object | 303 | This function is called with the original error object |
| 304 | and returns a new error object. | 304 | and returns a new error object. |
| @@ -343,7 +343,7 @@ which is then called a @def{metamethod}. | |||
| 343 | In the previous example, the key is the string @St{__add} | 343 | In the previous example, the key is the string @St{__add} |
| 344 | and the metamethod is the function that performs the addition. | 344 | and the metamethod is the function that performs the addition. |
| 345 | Unless stated otherwise, | 345 | Unless stated otherwise, |
| 346 | a metamethod may in fact be any @x{callable value}, | 346 | a metamethod can in fact be any @x{callable value}, |
| 347 | which is either a function or a value with a @idx{__call} metamethod. | 347 | which is either a function or a value with a @idx{__call} metamethod. |
| 348 | 348 | ||
| 349 | You can query the metatable of any value | 349 | You can query the metatable of any value |
| @@ -1417,7 +1417,7 @@ labels in Lua are considered statements too: | |||
| 1417 | 1417 | ||
| 1418 | A label is visible in the entire block where it is defined, | 1418 | A label is visible in the entire block where it is defined, |
| 1419 | except inside nested functions. | 1419 | except inside nested functions. |
| 1420 | A goto may jump to any visible label as long as it does not | 1420 | A goto can jump to any visible label as long as it does not |
| 1421 | enter into the scope of a local variable. | 1421 | enter into the scope of a local variable. |
| 1422 | A label should not be declared | 1422 | A label should not be declared |
| 1423 | where a label with the same name is visible, | 1423 | where a label with the same name is visible, |
| @@ -4488,7 +4488,7 @@ but can contain other zeros in its body. | |||
| 4488 | 4488 | ||
| 4489 | This function can raise memory errors only | 4489 | This function can raise memory errors only |
| 4490 | when converting a number to a string | 4490 | when 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 |
| 58 | local function PU (p) | 58 | local 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) |
