Skip to content

Commit 23d1e04

Browse files
committed
Lua updated to release 5.4.4.
1 parent 053363b commit 23d1e04

34 files changed

+621
-339
lines changed

highlight-wrapper/lua/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ TO_MAN= lua.1 luac.1
4646

4747
# Lua version and release.
4848
V= 5.4
49-
R= $V.3
49+
R= $V.4
5050

5151
# Targets start here.
5252
all: $(PLAT)

highlight-wrapper/lua/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
This is Lua 5.4.3, released on 15 Mar 2021.
2+
This is Lua 5.4.4, released on 13 Jan 2022.
33

44
For installation instructions, license details, and
55
further information about Lua, see doc/readme.html.

highlight-wrapper/lua/doc/contents.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <H1>
3232

3333
<P>
3434
<SMALL>
35-
Copyright &copy; 2020&ndash;2021 Lua.org, PUC-Rio.
35+
Copyright &copy; 2020&ndash;2022 Lua.org, PUC-Rio.
3636
Freely available under the terms of the
3737
<A HREF="http://www.lua.org/license.html">Lua license</A>.
3838
</SMALL>
@@ -664,10 +664,10 @@ <H3><A NAME="constants">constants</A></H3>
664664

665665
<P CLASS="footer">
666666
Last update:
667-
Wed Mar 3 13:04:44 UTC 2021
667+
Thu Jan 13 11:32:22 UTC 2022
668668
</P>
669669
<!--
670-
Last change: revised for Lua 5.4.3
670+
Last change: revised for Lua 5.4.4
671671
-->
672672

673673
</BODY>

highlight-wrapper/lua/doc/manual.html

Lines changed: 82 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <H1>
1919

2020
<P>
2121
<SMALL>
22-
Copyright &copy; 2020&ndash;2021 Lua.org, PUC-Rio.
22+
Copyright &copy; 2020&ndash;2022 Lua.org, PUC-Rio.
2323
Freely available under the terms of the
2424
<a href="http://www.lua.org/license.html">Lua license</a>.
2525
</SMALL>
@@ -961,11 +961,8 @@ <h3>2.5.3 &ndash; <a name="2.5.3">Garbage-Collection Metamethods</a></h3>
961961

962962

963963
<p>
964-
Finalizers cannot yield.
965-
Except for that, they can do anything,
966-
such as raise errors, create new objects,
967-
or even run the garbage collector.
968-
However, because they can run in unpredictable times,
964+
Finalizers cannot yield nor run the garbage collector.
965+
Because they can run in unpredictable times,
969966
it is good practice to restrict each finalizer
970967
to the minimum necessary to properly release
971968
its associated resource.
@@ -1636,8 +1633,10 @@ <h3>3.3.3 &ndash; <a name="3.3.3">Assignment</a></h3>
16361633

16371634

16381635
<p>
1639-
The assignment statement first evaluates all its expressions
1640-
and only then the assignments are performed.
1636+
If a variable is both assigned and read
1637+
inside a multiple assignment,
1638+
Lua ensures all reads get the value of the variable
1639+
before the assignment.
16411640
Thus the code
16421641

16431642
<pre>
@@ -1661,6 +1660,14 @@ <h3>3.3.3 &ndash; <a name="3.3.3">Assignment</a></h3>
16611660
cyclically permutes the values of <code>x</code>, <code>y</code>, and <code>z</code>.
16621661

16631662

1663+
<p>
1664+
Note that this guarantee covers only accesses
1665+
syntactically inside the assignment statement.
1666+
If a function or a metamethod called during the assignment
1667+
changes the value of a variable,
1668+
Lua gives no guarantees about the order of that access.
1669+
1670+
16641671
<p>
16651672
An assignment to a global name <code>x = val</code>
16661673
is equivalent to the assignment
@@ -2416,16 +2423,21 @@ <h3>3.4.7 &ndash; <a name="3.4.7">The Length Operator</a></h3>
24162423
<p>
24172424
The length operator applied on a table
24182425
returns a border in that table.
2419-
A <em>border</em> in a table <code>t</code> is any natural number
2426+
A <em>border</em> in a table <code>t</code> is any non-negative integer
24202427
that satisfies the following condition:
24212428

24222429
<pre>
2423-
(border == 0 or t[border] ~= nil) and t[border + 1] == nil
2430+
(border == 0 or t[border] ~= nil) and
2431+
(t[border + 1] == nil or border == math.maxinteger)
24242432
</pre><p>
24252433
In words,
2426-
a border is any (natural) index present in the table
2427-
that is followed by an absent index
2428-
(or zero, when index 1 is absent).
2434+
a border is any positive integer index present in the table
2435+
that is followed by an absent index,
2436+
plus two limit cases:
2437+
zero, when index 1 is absent;
2438+
and the maximum value for an integer, when that index is present.
2439+
Note that keys that are not positive integers
2440+
do not interfere with borders.
24292441

24302442

24312443
<p>
@@ -2436,12 +2448,9 @@ <h3>3.4.7 &ndash; <a name="3.4.7">The Length Operator</a></h3>
24362448
and therefore it is not a sequence.
24372449
(The <b>nil</b> at index 4 is called a <em>hole</em>.)
24382450
The table <code>{nil, 20, 30, nil, nil, 60, nil}</code>
2439-
has three borders (0, 3, and 6) and three holes
2440-
(at indices 1, 4, and 5),
2451+
has three borders (0, 3, and 6),
24412452
so it is not a sequence, too.
24422453
The table <code>{}</code> is a sequence with border 0.
2443-
Note that non-natural keys do not interfere
2444-
with whether a table is a sequence.
24452454

24462455

24472456
<p>
@@ -2459,7 +2468,7 @@ <h3>3.4.7 &ndash; <a name="3.4.7">The Length Operator</a></h3>
24592468
<p>
24602469
The computation of the length of a table
24612470
has a guaranteed worst time of <em>O(log n)</em>,
2462-
where <em>n</em> is the largest natural key in the table.
2471+
where <em>n</em> is the largest integer key in the table.
24632472

24642473

24652474
<p>
@@ -3979,6 +3988,10 @@ <h2>4.6 &ndash; <a name="4.6">Functions and Types</a></h2>
39793988
see <a href="#pdf-collectgarbage"><code>collectgarbage</code></a>.
39803989

39813990

3991+
<p>
3992+
This function should not be called by a finalizer.
3993+
3994+
39823995

39833996

39843997

@@ -5933,7 +5946,10 @@ <h2>4.7 &ndash; <a name="4.7">The Debug Interface</a></h2>
59335946
<a href="#lua_getstack"><code>lua_getstack</code></a> fills only the private part
59345947
of this structure, for later use.
59355948
To fill the other fields of <a href="#lua_Debug"><code>lua_Debug</code></a> with useful information,
5936-
you must call <a href="#lua_getinfo"><code>lua_getinfo</code></a>.
5949+
you must call <a href="#lua_getinfo"><code>lua_getinfo</code></a> with an appropriate parameter.
5950+
(Specifically, to get a field,
5951+
you must add the letter between parentheses in the field's comment
5952+
to the parameter <code>what</code> of <a href="#lua_getinfo"><code>lua_getinfo</code></a>.)
59375953

59385954

59395955
<p>
@@ -6110,47 +6126,46 @@ <h2>4.7 &ndash; <a name="4.7">The Debug Interface</a></h2>
61106126
<p>
61116127
Each character in the string <code>what</code>
61126128
selects some fields of the structure <code>ar</code> to be filled or
6113-
a value to be pushed on the stack:
6129+
a value to be pushed on the stack.
6130+
(These characters are also documented in the declaration of
6131+
the structure <a href="#lua_Debug"><code>lua_Debug</code></a>,
6132+
between parentheses in the comments following each field.)
61146133

61156134
<ul>
61166135

6117-
<li><b>'<code>n</code>': </b> fills in the field <code>name</code> and <code>namewhat</code>;
6136+
<li><b>'<code>f</code>': </b>
6137+
pushes onto the stack the function that is
6138+
running at the given level;
6139+
</li>
6140+
6141+
<li><b>'<code>l</code>': </b> fills in the field <code>currentline</code>;
6142+
</li>
6143+
6144+
<li><b>'<code>n</code>': </b> fills in the fields <code>name</code> and <code>namewhat</code>;
6145+
</li>
6146+
6147+
<li><b>'<code>r</code>': </b> fills in the fields <code>ftransfer</code> and <code>ntransfer</code>;
61186148
</li>
61196149

61206150
<li><b>'<code>S</code>': </b>
61216151
fills in the fields <code>source</code>, <code>short_src</code>,
61226152
<code>linedefined</code>, <code>lastlinedefined</code>, and <code>what</code>;
61236153
</li>
61246154

6125-
<li><b>'<code>l</code>': </b> fills in the field <code>currentline</code>;
6126-
</li>
6127-
61286155
<li><b>'<code>t</code>': </b> fills in the field <code>istailcall</code>;
61296156
</li>
61306157

61316158
<li><b>'<code>u</code>': </b> fills in the fields
61326159
<code>nups</code>, <code>nparams</code>, and <code>isvararg</code>;
61336160
</li>
61346161

6135-
<li><b>'<code>f</code>': </b>
6136-
pushes onto the stack the function that is
6137-
running at the given level;
6138-
</li>
6139-
61406162
<li><b>'<code>L</code>': </b>
6141-
pushes onto the stack a table whose indices are the
6142-
numbers of the lines that are valid on the function.
6143-
(A <em>valid line</em> is a line with some associated code,
6144-
that is, a line where you can put a break point.
6145-
Non-valid lines include empty lines and comments.)
6146-
6147-
6148-
<p>
6163+
pushes onto the stack a table whose indices are
6164+
the lines on the function with some associated code,
6165+
that is, the lines where you can put a break point.
6166+
(Lines with no code include empty lines and comments.)
61496167
If this option is given together with option '<code>f</code>',
61506168
its table is pushed after the function.
6151-
6152-
6153-
<p>
61546169
This is the only option that can raise a memory error.
61556170
</li>
61566171

@@ -6508,7 +6523,7 @@ <h2>5.1 &ndash; <a name="5.1">Functions and Types</a></h2>
65086523

65096524

65106525
<hr><h3><a name="luaL_addgsub"><code>luaL_addgsub</code></a></h3><p>
6511-
<span class="apii">[-0, +0, <em>m</em>]</span>
6526+
<span class="apii">[-?, +?, <em>m</em>]</span>
65126527
<pre>const void luaL_addgsub (luaL_Buffer *B, const char *s,
65136528
const char *p, const char *r);</pre>
65146529

@@ -6562,7 +6577,7 @@ <h2>5.1 &ndash; <a name="5.1">Functions and Types</a></h2>
65626577

65636578

65646579
<hr><h3><a name="luaL_addvalue"><code>luaL_addvalue</code></a></h3><p>
6565-
<span class="apii">[-1, +?, <em>m</em>]</span>
6580+
<span class="apii">[-?, +?, <em>m</em>]</span>
65666581
<pre>void luaL_addvalue (luaL_Buffer *B);</pre>
65676582

65686583
<p>
@@ -6716,7 +6731,7 @@ <h2>5.1 &ndash; <a name="5.1">Functions and Types</a></h2>
67166731

67176732

67186733
<hr><h3><a name="luaL_buffinit"><code>luaL_buffinit</code></a></h3><p>
6719-
<span class="apii">[-0, +0, &ndash;]</span>
6734+
<span class="apii">[-0, +?, &ndash;]</span>
67206735
<pre>void luaL_buffinit (lua_State *L, luaL_Buffer *B);</pre>
67216736

67226737
<p>
@@ -6754,7 +6769,7 @@ <h2>5.1 &ndash; <a name="5.1">Functions and Types</a></h2>
67546769

67556770

67566771
<hr><h3><a name="luaL_buffsub"><code>luaL_buffsub</code></a></h3><p>
6757-
<span class="apii">[-0, +0, &ndash;]</span>
6772+
<span class="apii">[-?, +?, &ndash;]</span>
67586773
<pre>void luaL_buffsub (luaL_Buffer *B, int n);</pre>
67596774

67606775
<p>
@@ -7557,6 +7572,11 @@ <h2>5.1 &ndash; <a name="5.1">Functions and Types</a></h2>
75577572
These values are popped from the stack after the registration.
75587573

75597574

7575+
<p>
7576+
A function with a <code>NULL</code> value represents a placeholder,
7577+
which is filled with <b>false</b>.
7578+
7579+
75607580

75617581

75627582

@@ -7919,6 +7939,10 @@ <h2>6.1 &ndash; <a name="6.1">Basic Functions</a></h2>
79197939
and some of these options.
79207940

79217941

7942+
<p>
7943+
This function should not be called by a finalizer.
7944+
7945+
79227946

79237947

79247948
<p>
@@ -7936,7 +7960,7 @@ <h2>6.1 &ndash; <a name="6.1">Basic Functions</a></h2>
79367960

79377961
<p>
79387962
<hr><h3><a name="pdf-error"><code>error (message [, level])</code></a></h3>
7939-
Raises an error (see <a href="#2.3">&sect;2.3</a>) with @{message} as the error object.
7963+
Raises an error (see <a href="#2.3">&sect;2.3</a>) with <code>message</code> as the error object.
79407964
This function never returns.
79417965

79427966

@@ -8111,9 +8135,8 @@ <h2>6.1 &ndash; <a name="6.1">Basic Functions</a></h2>
81118135

81128136

81138137
<p>
8114-
The behavior of <code>next</code> is undefined if,
8115-
during the traversal,
8116-
you assign any value to a non-existent field in the table.
8138+
You should not assign any value to a non-existent field in a table
8139+
during its traversal.
81178140
You may however modify existing fields.
81188141
In particular, you may set existing fields to nil.
81198142

@@ -8159,7 +8182,7 @@ <h2>6.1 &ndash; <a name="6.1">Basic Functions</a></h2>
81598182
instead, <code>pcall</code> catches the error
81608183
and returns a status code.
81618184
Its first result is the status code (a boolean),
8162-
which is true if the call succeeds without errors.
8185+
which is <b>true</b> if the call succeeds without errors.
81638186
In such case, <code>pcall</code> also returns all results from the call,
81648187
after this first result.
81658188
In case of any error, <code>pcall</code> returns <b>false</b> plus the error object.
@@ -8439,7 +8462,7 @@ <h2>6.2 &ndash; <a name="6.2">Coroutine Manipulation</a></h2>
84398462

84408463

84418464
<p>
8442-
Returns true when the coroutine <code>co</code> can yield.
8465+
Returns <b>true</b> when the coroutine <code>co</code> can yield.
84438466
The default for <code>co</code> is the running coroutine.
84448467

84458468

@@ -8483,7 +8506,7 @@ <h2>6.2 &ndash; <a name="6.2">Coroutine Manipulation</a></h2>
84838506

84848507
<p>
84858508
Returns the running coroutine plus a boolean,
8486-
true when the running coroutine is the main one.
8509+
<b>true</b> when the running coroutine is the main one.
84878510

84888511

84898512

@@ -9021,7 +9044,7 @@ <h2>6.4 &ndash; <a name="6.4">String Manipulation</a></h2>
90219044
A third, optional numeric argument <code>init</code> specifies
90229045
where to start the search;
90239046
its default value is&nbsp;1 and can be negative.
9024-
A value of <b>true</b> as a fourth, optional argument <code>plain</code>
9047+
A <b>true</b> as a fourth, optional argument <code>plain</code>
90259048
turns off the pattern matching facilities,
90269049
so the function does a plain "find substring" operation,
90279050
with no characters in <code>pattern</code> being considered magic.
@@ -9046,8 +9069,10 @@ <h2>6.4 &ndash; <a name="6.4">String Manipulation</a></h2>
90469069
which must be a string.
90479070
The format string follows the same rules as the ISO&nbsp;C function <code>sprintf</code>.
90489071
The only differences are that the conversion specifiers and modifiers
9049-
<code>*</code>, <code>h</code>, <code>L</code>, <code>l</code>, and <code>n</code> are not supported
9072+
<code>F</code>, <code>n</code>, <code>*</code>, <code>h</code>, <code>L</code>, and <code>l</code> are not supported
90509073
and that there is an extra specifier, <code>q</code>.
9074+
Both width and precision, when present,
9075+
are limited to two digits.
90519076

90529077

90539078
<p>
@@ -9071,7 +9096,7 @@ <h2>6.4 &ndash; <a name="6.4">String Manipulation</a></h2>
90719096
"a string with \"quotes\" and \
90729097
new line"
90739098
</pre><p>
9074-
This specifier does not support modifiers (flags, width, length).
9099+
This specifier does not support modifiers (flags, width, precision).
90759100

90769101

90779102
<p>
@@ -10362,7 +10387,7 @@ <h2>6.7 &ndash; <a name="6.7">Mathematical Functions</a></h2>
1036210387

1036310388
<p>
1036410389
Returns a boolean,
10365-
true if and only if integer <code>m</code> is below integer <code>n</code> when
10390+
<b>true</b> if and only if integer <code>m</code> is below integer <code>n</code> when
1036610391
they are compared as unsigned integers.
1036710392

1036810393

@@ -11924,10 +11949,10 @@ <h1>9 &ndash; <a name="9">The Complete Syntax of Lua</a></h1>
1192411949

1192511950
<P CLASS="footer">
1192611951
Last update:
11927-
Mon Mar 15 13:39:42 UTC 2021
11952+
Thu Jan 13 11:33:16 UTC 2022
1192811953
</P>
1192911954
<!--
11930-
Last change: revised for Lua 5.4.3
11955+
Last change: revised for Lua 5.4.4
1193111956
-->
1193211957

1193311958
</body></html>

0 commit comments

Comments
 (0)