diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/contents.html | 14 | ||||
-rw-r--r-- | doc/lua.1 | 6 | ||||
-rw-r--r-- | doc/lua.css | 1 | ||||
-rw-r--r-- | doc/manual.html | 50 | ||||
-rw-r--r-- | doc/readme.html | 48 |
5 files changed, 68 insertions, 51 deletions
diff --git a/doc/contents.html b/doc/contents.html index 1231e6d2481d..e17104845a2d 100644 --- a/doc/contents.html +++ b/doc/contents.html @@ -10,7 +10,7 @@ <BODY> <H1> -<A HREF="http://www.lua.org/"><IMG SRC="logo.gif" ALT="Lua"></A> +<A HREF="https://www.lua.org/"><IMG SRC="logo.gif" ALT="Lua"></A> Lua 5.4 Reference Manual </H1> @@ -18,7 +18,7 @@ Lua 5.4 Reference Manual The reference manual is the official definition of the Lua language. <BR> For a complete introduction to Lua programming, see the book -<A HREF="http://www.lua.org/pil/">Programming in Lua</A>. +<A HREF="https://www.lua.org/pil/">Programming in Lua</A>. <DIV CLASS="menubar"> <A HREF="manual.html">start</A> @@ -27,14 +27,14 @@ For a complete introduction to Lua programming, see the book · <A HREF="#index">index</A> · -<A HREF="http://www.lua.org/manual/">other versions</A> +<A HREF="https://www.lua.org/manual/">other versions</A> </DIV> <P> <SMALL> -Copyright © 2020–2023 Lua.org, PUC-Rio. +Copyright © 2020–2024 Lua.org, PUC-Rio. Freely available under the terms of the -<A HREF="http://www.lua.org/license.html">Lua license</A>. +<A HREF="https://www.lua.org/license.html">Lua license</A>. </SMALL> <H2><A NAME="contents">Contents</A></H2> @@ -668,10 +668,10 @@ Freely available under the terms of the <P CLASS="footer"> Last update: -Sat Apr 1 17:57:05 UTC 2023 +Thu May 9 14:47:09 UTC 2024 </P> <!-- -Last change: revised for Lua 5.4.5 +Last change: revised for Lua 5.4.7 --> </BODY> diff --git a/doc/lua.1 b/doc/lua.1 index 3f472fd81f62..3c9e000234e3 100644 --- a/doc/lua.1 +++ b/doc/lua.1 @@ -1,5 +1,5 @@ -.\" $Id: lua.man,v 1.14 2022/09/23 09:06:36 lhf Exp $ -.TH LUA 1 "$Date: 2022/09/23 09:06:36 $" +.\" $Id: lua.man,v 1.14 2024/05/08 18:48:27 lhf Exp $ +.TH LUA 1 "$Date: 2024/05/08 18:48:27 $" .SH NAME lua \- Lua interpreter .SH SYNOPSIS @@ -123,7 +123,7 @@ and the version-neutral variants are ignored. Code to be executed before command line options and scripts. .TP .B LUA_PATH, LUA_PATH_5_4 -Initial value of package.cpath, +Initial value of package.path, the path used by require to search for Lua loaders. .TP .B LUA_CPATH, LUA_CPATH_5_4 diff --git a/doc/lua.css b/doc/lua.css index cbd0799d1525..9013b445c654 100644 --- a/doc/lua.css +++ b/doc/lua.css @@ -143,6 +143,7 @@ table.book td.cover { table.book img { border: solid #000080 1px ; + border-radius: 2px ; } table.book span { diff --git a/doc/manual.html b/doc/manual.html index 0af688b343c7..574c7432c0f3 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -10,7 +10,7 @@ <BODY> <H1> -<A HREF="http://www.lua.org/"><IMG SRC="logo.gif" ALT="Lua"></A> +<A HREF="https://www.lua.org/"><IMG SRC="logo.gif" ALT="Lua"></A> Lua 5.4 Reference Manual </H1> @@ -19,9 +19,9 @@ by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes <P> <SMALL> -Copyright © 2020–2023 Lua.org, PUC-Rio. +Copyright © 2020–2024 Lua.org, PUC-Rio. Freely available under the terms of the -<a href="http://www.lua.org/license.html">Lua license</a>. +<a href="https://www.lua.org/license.html">Lua license</a>. </SMALL> <DIV CLASS="menubar"> @@ -29,7 +29,7 @@ Freely available under the terms of the · <A HREF="contents.html#index">index</A> · -<A HREF="http://www.lua.org/manual/">other versions</A> +<A HREF="https://www.lua.org/manual/">other versions</A> </DIV> <!-- ====================================================================== --> @@ -391,7 +391,7 @@ Whenever there is an error, an <em>error object</em> 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, @@ -401,7 +401,7 @@ even though it does not have to be a string. <p> When you use <a href="#pdf-xpcall"><code>xpcall</code></a> (or <a href="#lua_pcall"><code>lua_pcall</code></a>, in C) -you may give a <em>message handler</em> +you can give a <em>message handler</em> to be called in case of errors. This function is called with the original error object and returns a new error object. @@ -453,7 +453,7 @@ which is then called a <em>metamethod</em>. In the previous example, the key is the string "<code>__add</code>" and the metamethod is the function that performs the addition. Unless stated otherwise, -a metamethod may in fact be any callable value, +a metamethod can in fact be any callable value, which is either a function or a value with a <code>__call</code> metamethod. @@ -1725,7 +1725,7 @@ labels in Lua are considered statements too: <p> 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, @@ -5571,7 +5571,7 @@ otherwise, returns <code>NULL</code>. <hr><h3><a name="lua_toclose"><code>lua_toclose</code></a></h3><p> -<span class="apii">[-0, +0, <em>m</em>]</span> +<span class="apii">[-0, +0, <em>v</em>]</span> <pre>void lua_toclose (lua_State *L, int index);</pre> <p> @@ -5592,6 +5592,11 @@ unless previously deactivated by <a href="#lua_closeslot"><code>lua_closeslot</c <p> +This function raises an error if the value at the given slot +neither has a <code>__close</code> metamethod nor is a false value. + + +<p> This function should not be called for an index that is equal to or below an active to-be-closed slot. @@ -5664,6 +5669,12 @@ after its last character (as in C), but can contain other zeros in its body. +<p> +This function can raise memory errors only +when converting a number to a string +(as then it may create a new string). + + @@ -11276,13 +11287,13 @@ The returned table can contain all the fields returned by <a href="#lua_getinfo" with the string <code>what</code> describing which fields to fill in. The default for <code>what</code> is to get all information available, except the table of valid lines. -If present, -the option '<code>f</code>' +The option '<code>f</code>' adds a field named <code>func</code> with the function itself. -If present, -the option '<code>L</code>' -adds a field named <code>activelines</code> with the table of -valid lines. +The option '<code>L</code>' adds a field named <code>activelines</code> +with the table of valid lines, +provided the function is a Lua function. +If the function has no debug information, +the table is empty. <p> @@ -11619,6 +11630,10 @@ Lua does not consult any environment variables. In particular, the values of <a href="#pdf-package.path"><code>package.path</code></a> and <a href="#pdf-package.cpath"><code>package.cpath</code></a> are set with the default paths defined in <code>luaconf.h</code>. +To signal to the libraries that this option is on, +the stand-alone interpreter sets the field +<code>"LUA_NOENV"</code> in the registry to a true value. +Other libraries may consult this field for the same purpose. <p> @@ -12033,13 +12048,12 @@ and LiteralString, see <a href="#3.1">§3.1</a>.) - <P CLASS="footer"> Last update: -Tue May 2 20:09:38 UTC 2023 +Thu Jun 13 22:15:52 UTC 2024 </P> <!-- -Last change: revised for Lua 5.4.6 +Last change: revised for Lua 5.4.7 --> </body></html> diff --git a/doc/readme.html b/doc/readme.html index 918ec8ed9378..3bcefadfe9aa 100644 --- a/doc/readme.html +++ b/doc/readme.html @@ -29,7 +29,7 @@ tt, kbd, code { <BODY> <H1> -<A HREF="http://www.lua.org/"><IMG SRC="logo.gif" ALT="Lua"></A> +<A HREF="https://www.lua.org/"><IMG SRC="logo.gif" ALT="Lua"></A> Welcome to Lua 5.4 </H1> @@ -49,29 +49,31 @@ Welcome to Lua 5.4 <P> Lua is a powerful, efficient, lightweight, embeddable scripting language developed by a -<A HREF="http://www.lua.org/authors.html">team</A> +<A HREF="https://www.lua.org/authors.html">team</A> at -<A HREF="http://www.puc-rio.br/">PUC-Rio</A>, +<A HREF="https://www.puc-rio.br/">PUC-Rio</A>, the Pontifical Catholic University of Rio de Janeiro in Brazil. Lua is <A HREF="#license">free software</A> used in -<A HREF="http://www.lua.org/uses.html">many products and projects</A> +<A HREF="https://www.lua.org/uses.html">many products and projects</A> around the world. <P> Lua's -<A HREF="http://www.lua.org/">official web site</A> +<A HREF="https://www.lua.org/">official website</A> provides complete information about Lua, including an -<A HREF="http://www.lua.org/about.html">executive summary</A> +<A HREF="https://www.lua.org/about.html">executive summary</A>, +tips on +<A HREF="https://www.lua.org/start.html">getting started</A>, and updated -<A HREF="http://www.lua.org/docs.html">documentation</A>, +<A HREF="https://www.lua.org/docs.html">documentation</A>, especially the -<A HREF="http://www.lua.org/manual/5.4/">reference manual</A>, +<A HREF="https://www.lua.org/manual/5.4/">reference manual</A>, which may differ slightly from the <A HREF="contents.html">local copy</A> distributed in this package. @@ -79,7 +81,7 @@ distributed in this package. <H2><A NAME="install">Installing Lua</A></H2> <P> Lua is distributed in -<A HREF="http://www.lua.org/ftp/">source</A> +<A HREF="https://www.lua.org/ftp/">source</A> form. You need to build it before using it. Building Lua should be straightforward @@ -88,7 +90,7 @@ Lua is implemented in pure ANSI C and compiles unmodified in all known platforms that have an ANSI C compiler. Lua also compiles unmodified as C++. The instructions given below for building Lua are for Unix-like platforms, -such as Linux and Mac OS X. +such as Linux and macOS. See also <A HREF="#other">instructions for other systems</A> and @@ -97,7 +99,7 @@ and <P> If you don't have the time or the inclination to compile Lua yourself, get a binary from -<A HREF="http://lua-users.org/wiki/LuaBinaries">LuaBinaries</A>. +<A HREF="https://luabinaries.sourceforge.net">LuaBinaries</A>. <H3>Building Lua</H3> <P> @@ -107,7 +109,7 @@ Here are the details. <OL> <LI> Open a terminal window and move to -the top-level directory, which is named <TT>lua-5.4.6</TT>. +the top-level directory, which is named <TT>lua-5.4.7</TT>. The <TT>Makefile</TT> there controls both the build process and the installation process. <P> <LI> @@ -211,8 +213,8 @@ then try "<KBD>make linux-readline MYLIBS=-ltermcap</KBD>". record the changes you've made. <P> - On the other hand, if you need to customize some Lua features, you'll need - to edit <TT>src/luaconf.h</TT> before building and installing Lua. + On the other hand, if you need to customize some Lua features, + edit <TT>src/luaconf.h</TT> before building and installing Lua. The edited file will be the one installed, and it will be used by any Lua clients that you build, to ensure consistency. Further customization is available to experts by editing the Lua sources. @@ -241,7 +243,7 @@ compiler: </DL> <P> - To use Lua as a library in your own programs, you'll need to know how to + To use Lua as a library in your own programs, you need to know how to create and use libraries with your compiler. Moreover, to dynamically load C libraries for Lua, you'll need to know how to create dynamic libraries and you'll need to make sure that the Lua API functions are accessible to @@ -284,11 +286,11 @@ lists the <H2><A NAME="license">License</A></H2> <P> -<A HREF="http://www.opensource.org/docs/definition.php"> -<IMG SRC="osi-certified-72x60.png" ALIGN="right" ALT="[osi certified]" STYLE="padding-left: 30px ;"> +<A HREF="https://opensource.org/osd"> +<IMG SRC="OSIApproved_100X125.png" ALIGN="right" ALT="[Open Source Initiative Approved License]" STYLE="padding-left: 1em" WIDTH=50> </A> Lua is free software distributed under the terms of the -<A HREF="http://www.opensource.org/licenses/mit-license.html">MIT license</A> +<A HREF="https://opensource.org/license/mit">MIT license</A> reproduced below; it may be used for any purpose, including commercial purposes, at absolutely no cost without having to ask us. @@ -296,11 +298,11 @@ at absolutely no cost without having to ask us. The only requirement is that if you do use Lua, then you should give us credit by including the appropriate copyright notice somewhere in your product or its documentation. -For details, see -<A HREF="http://www.lua.org/license.html">this</A>. +For details, see the +<A HREF="https://www.lua.org/license.html">license page</A>. <BLOCKQUOTE STYLE="padding-bottom: 0em"> -Copyright © 1994–2023 Lua.org, PUC-Rio. +Copyright © 1994–2024 Lua.org, PUC-Rio. <P> Permission is hereby granted, free of charge, to any person obtaining a copy @@ -327,10 +329,10 @@ THE SOFTWARE. <P CLASS="footer"> Last update: -Tue May 2 20:08:55 UTC 2023 +Wed May 8 21:56:16 UTC 2024 </P> <!-- -Last change: revised for Lua 5.4.6 +Last change: revised for Lua 5.4.7 --> </BODY> |