Skip to content

Commit

Permalink
Updated to Lua 5.4.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Taronyu committed Jul 24, 2024
1 parent 59aa766 commit 6db40b6
Show file tree
Hide file tree
Showing 38 changed files with 437 additions and 321 deletions.
21 changes: 6 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
cmake_minimum_required(VERSION 3.10)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type: Debug or Release" FORCE)
endif()

if(CMAKE_CONFIGURATION_TYPES)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Limited configurartions" FORCE)
mark_as_advanced(CMAKE_CONFIGURATION_TYPES)
endif()

project(lua VERSION 5.4.4 LANGUAGES NONE)
project(lua VERSION 5.4.7 LANGUAGES NONE)

option(LUA_BUILD_LUAC "Build Lua compiler" ON)
option(LUA_BUILD_CLI "Build Lua CLI interpreter" ON)
Expand Down Expand Up @@ -39,7 +30,7 @@ set(INSTALL_MISC_DIR share/lua)

set(LUA_PUB_H src/lua.h src/luaconf.h src/lualib.h src/lauxlib.h src/lua.hpp)

set(LUA_INT_H
set(LUA_PRIV_H
src/lapi.h src/ldo.h src/lmem.h src/lstate.h src/lfunc.h src/lobject.h
src/lstring.h src/lcode.h src/lgc.h src/lopcodes.h src/ltable.h
src/lundump.h src/lctype.h src/llex.h src/lparser.h src/ltm.h src/lvm.h
Expand All @@ -53,9 +44,9 @@ SET(LUA_SRC
src/lcorolib.c src/ldblib.c src/liolib.c src/lmathlib.c src/loadlib.c
src/loslib.c src/lstrlib.c src/ltablib.c src/lutf8lib.c src/linit.c)

add_library(lua ${LUA_SRC} ${LUA_PUB_H} ${LUA_INT_H})
add_library(lua ${LUA_SRC} ${LUA_PUB_H} ${LUA_PRIV_H})

target_compile_definitions(lua PUBLIC LUA_COMPAT_5_2)
target_compile_definitions(lua PUBLIC LUA_COMPAT_5_3)
set_target_properties(lua PROPERTIES DEFINE_SYMBOL LUA_EXPORTS)

if(CMAKE_COMPILER_IS_GNUCXX)
Expand Down Expand Up @@ -84,7 +75,7 @@ install(TARGETS lua
install(FILES ${LUA_PUB_H} DESTINATION include/lua COMPONENT devel)

if(LUA_BUILD_LUAC)
add_executable(luac ${LUA_SRC} src/luac.c ${LUA_PUB_H} ${LUA_INT_H})
add_executable(luac ${LUA_SRC} src/luac.c ${LUA_PUB_H} ${LUA_PRIV_H})

if(LUA_OS_LINUX)
target_link_libraries(luac PRIVATE m dl readline)
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

This is Lua 5.4.6, released on 02 May 2023.
This is Lua 5.4.7, released on 13 Jun 2024.

For installation instructions, license details, and
further information about Lua, see doc/readme.html.
Expand Down
Binary file added doc/OSIApproved_100X125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions doc/contents.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<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>

<P>
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>
Expand All @@ -27,14 +27,14 @@ <H1>
&middot;
<A HREF="#index">index</A>
&middot;
<A HREF="http://www.lua.org/manual/">other versions</A>
<A HREF="https://www.lua.org/manual/">other versions</A>
</DIV>

<P>
<SMALL>
Copyright &copy; 2020&ndash;2023 Lua.org, PUC-Rio.
Copyright &copy; 2020&ndash;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>
Expand Down Expand Up @@ -668,10 +668,10 @@ <H3><A NAME="constants">constants</A></H3>

<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>
Expand Down
6 changes: 3 additions & 3 deletions doc/lua.1
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions doc/lua.css
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ table.book td.cover {

table.book img {
border: solid #000080 1px ;
border-radius: 2px ;
}

table.book span {
Expand Down
50 changes: 32 additions & 18 deletions doc/manual.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand All @@ -19,17 +19,17 @@ <H1>

<P>
<SMALL>
Copyright &copy; 2020&ndash;2023 Lua.org, PUC-Rio.
Copyright &copy; 2020&ndash;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">
<A HREF="contents.html#contents">contents</A>
&middot;
<A HREF="contents.html#index">index</A>
&middot;
<A HREF="http://www.lua.org/manual/">other versions</A>
<A HREF="https://www.lua.org/manual/">other versions</A>
</DIV>

<!-- ====================================================================== -->
Expand Down Expand Up @@ -391,7 +391,7 @@ <h2>2.3 &ndash; <a name="2.3">Error Handling</a></h2>
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,
Expand All @@ -401,7 +401,7 @@ <h2>2.3 &ndash; <a name="2.3">Error Handling</a></h2>

<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.
Expand Down Expand Up @@ -453,7 +453,7 @@ <h2>2.4 &ndash; <a name="2.4">Metatables and Metamethods</a></h2>
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.


Expand Down Expand Up @@ -1725,7 +1725,7 @@ <h3>3.3.4 &ndash; <a name="3.3.4">Control Structures</a></h3><p>
<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,
Expand Down Expand Up @@ -5571,7 +5571,7 @@ <h2>4.6 &ndash; <a name="4.6">Functions and Types</a></h2>


<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>
Expand All @@ -5591,6 +5591,11 @@ <h2>4.6 &ndash; <a name="4.6">Functions and Types</a></h2>
unless previously deactivated by <a href="#lua_closeslot"><code>lua_closeslot</code></a>.


<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.
Expand Down Expand Up @@ -5664,6 +5669,12 @@ <h2>4.6 &ndash; <a name="4.6">Functions and Types</a></h2>
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).





Expand Down Expand Up @@ -11276,13 +11287,13 @@ <h2>6.10 &ndash; <a name="6.10">The Debug Library</a></h2>
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>
Expand Down Expand Up @@ -11619,6 +11630,10 @@ <h1>7 &ndash; <a name="7">Lua Standalone</a></h1>
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>
Expand Down Expand Up @@ -12033,13 +12048,12 @@ <h1>9 &ndash; <a name="9">The Complete Syntax of Lua</a></h1>




<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>
Expand Down
Binary file removed doc/osi-certified-72x60.png
Binary file not shown.
Loading

0 comments on commit 6db40b6

Please sign in to comment.