diff --git a/CMakeLists.txt b/CMakeLists.txt index cded78d..4f4ac55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -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 @@ -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) @@ -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) diff --git a/README b/README index 1ae9716..fe99b87 100644 --- a/README +++ b/README @@ -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. diff --git a/doc/OSIApproved_100X125.png b/doc/OSIApproved_100X125.png new file mode 100644 index 0000000..795f7a0 Binary files /dev/null and b/doc/OSIApproved_100X125.png differ diff --git a/doc/contents.html b/doc/contents.html index 1231e6d..e171048 100644 --- a/doc/contents.html +++ b/doc/contents.html @@ -10,7 +10,7 @@
-Copyright © 2020–2023 Lua.org, PUC-Rio. +Copyright © 2020–2024 Lua.org, PUC-Rio. Freely available under the terms of the -Lua license. +Lua license.
-Copyright © 2020–2023 Lua.org, PUC-Rio. +Copyright © 2020–2024 Lua.org, PUC-Rio. Freely available under the terms of the -Lua license. +Lua license.
@@ -391,7 +391,7 @@
When you use xpcall
(or lua_pcall
, in C)
-you may give a message handler
+you can give a message handler
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 @@
__add
"
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 __call
metamethod.
@@ -1725,7 +1725,7 @@
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 @@
lua_toclose
-[-0, +0, m] +[-0, +0, v]
void lua_toclose (lua_State *L, int index);
@@ -5591,6 +5591,11 @@
lua_closeslot
.
+
+This function raises an error if the value at the given slot
+neither has a __close
metamethod nor is a false value.
+
+
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 @@
+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 @@
what
describing which fields to fill in.
The default for what
is to get all information available,
except the table of valid lines.
-If present,
-the option 'f
'
+The option 'f
'
adds a field named func
with the function itself.
-If present,
-the option 'L
'
-adds a field named activelines
with the table of
-valid lines.
+The option 'L
' adds a field named activelines
+with the table of valid lines,
+provided the function is a Lua function.
+If the function has no debug information,
+the table is empty.
@@ -11619,6 +11630,10 @@
package.path
and package.cpath
are set with the default paths defined in luaconf.h
.
+To signal to the libraries that this option is on,
+the stand-alone interpreter sets the field
+"LUA_NOENV"
in the registry to a true value.
+Other libraries may consult this field for the same purpose.
@@ -12033,13 +12048,12 @@