Merge branch 'master' into nextversion

This commit is contained in:
Roberto Ierusalimschy
2023-06-22 11:41:48 -03:00
33 changed files with 308 additions and 208 deletions

View File

@@ -30,7 +30,7 @@ by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes
<p>
<small>
<a href="http://www.lua.org/copyright.html">Copyright</a>
&copy; 2022 Lua.org, PUC-Rio. All rights reserved.
&copy; 2023 Lua.org, PUC-Rio. All rights reserved.
</small>
<hr>

View File

@@ -20,7 +20,7 @@ making it ideal for configuration, scripting,
and rapid prototyping.
Lua is implemented as a library, written in @emphx{clean C},
the common subset of C and C++.
the common subset of @N{standard C} and C++.
The Lua distribution includes a host program called @id{lua},
which uses the Lua library to offer a complete,
standalone Lua interpreter,
@@ -3161,6 +3161,27 @@ when called through this function.
}
@APIEntry{int lua_closethread (lua_State *L, lua_State *from);|
@apii{0,?,-}
Resets a thread, cleaning its call stack and closing all pending
to-be-closed variables.
Returns a status code:
@Lid{LUA_OK} for no errors in the thread
(either the original error that stopped the thread or
errors in closing methods),
or an error status otherwise.
In case of error,
leaves the error object on the top of the stack.
The parameter @id{from} represents the coroutine that is resetting @id{L}.
If there is no such coroutine,
this parameter can be @id{NULL}.
(This function was introduced in @N{release 5.4.6}.)
}
@APIEntry{int lua_compare (lua_State *L, int index1, int index2, int op);|
@apii{0,0,e}
@@ -4157,23 +4178,12 @@ and then pops the top element.
}
@APIEntry{int lua_resetthread (lua_State *L, lua_State *from);|
@APIEntry{int lua_resetthread (lua_State *L);|
@apii{0,?,-}
Resets a thread, cleaning its call stack and closing all pending
to-be-closed variables.
Returns a status code:
@Lid{LUA_OK} for no errors in the thread
(either the original error that stopped the thread or
errors in closing methods),
or an error status otherwise.
In case of error,
leaves the error object on the top of the stack.
The parameter @id{from} represents the coroutine that is resetting @id{L}.
If there is no such coroutine,
this parameter can be @id{NULL}.
(This parameter was introduced in @N{release 5.4.5}.)
This function is deprecated;
it is equivalent to @Lid{lua_closethread} with
@id{from} being @id{NULL}.
}
@@ -5787,7 +5797,7 @@ with @id{tname} in the registry.
Creates a new Lua state.
It calls @Lid{lua_newstate} with an
allocator based on the @N{standard C} allocation functions
allocator based on the @N{ISO C} allocation functions
and then sets a warning function and a panic function @see{C-error}
that print messages to the standard error output.
@@ -6905,10 +6915,10 @@ including if necessary a path and an extension.
@id{funcname} must be the exact name exported by the @N{C library}
(which may depend on the @N{C compiler} and linker used).
This function is not supported by @N{ISO C}.
As such, it is only available on some platforms
(Windows, Linux, Mac OS X, Solaris, BSD,
plus other Unix systems that support the @id{dlfcn} standard).
This functionality is not supported by @N{ISO C}.
As such, @id{loadlib} is only available on some platforms:
Linux, Windows, Mac OS X, Solaris, BSD,
plus other Unix systems that support the @id{dlfcn} standard.
This function is inherently insecure,
as it allows Lua to call any function in any readable dynamic