From 95f31eafc0a126385b688edf5e54d49067ea04ac Mon Sep 17 00:00:00 2001 From: alex <38814044+alextwothousand@users.noreply.github.com> Date: Wed, 10 Mar 2021 20:46:07 +0000 Subject: [PATCH 1/3] Update to 5.4.2 --- CMakeLists.txt | 4 +- {lua-5.4.0 => lua-5.4.2}/CMakeLists.txt | 2 +- {lua-5.4.0 => lua-5.4.2}/Makefile | 2 +- {lua-5.4.0 => lua-5.4.2}/README | 2 +- {lua-5.4.0 => lua-5.4.2}/doc/contents.html | 7 +- {lua-5.4.0 => lua-5.4.2}/doc/index.css | 0 {lua-5.4.0 => lua-5.4.2}/doc/logo.gif | Bin {lua-5.4.0 => lua-5.4.2}/doc/lua.1 | 0 {lua-5.4.0 => lua-5.4.2}/doc/lua.css | 0 {lua-5.4.0 => lua-5.4.2}/doc/luac.1 | 0 {lua-5.4.0 => lua-5.4.2}/doc/manual.css | 0 {lua-5.4.0 => lua-5.4.2}/doc/manual.html | 220 ++++---- .../doc/osi-certified-72x60.png | Bin {lua-5.4.0 => lua-5.4.2}/doc/readme.html | 6 +- {lua-5.4.0 => lua-5.4.2}/include/lauxlib.h | 0 {lua-5.4.0 => lua-5.4.2}/include/lua.h | 2 +- {lua-5.4.0 => lua-5.4.2}/include/luaconf.h | 15 - {lua-5.4.0 => lua-5.4.2}/include/lualib.h | 0 {lua-5.4.0 => lua-5.4.2}/src/Makefile | 2 +- {lua-5.4.0 => lua-5.4.2}/src/lapi.c | 62 ++- {lua-5.4.0 => lua-5.4.2}/src/lapi.h | 0 {lua-5.4.0 => lua-5.4.2}/src/lauxlib.c | 78 ++- {lua-5.4.0 => lua-5.4.2}/src/lbaselib.c | 0 {lua-5.4.0 => lua-5.4.2}/src/lcode.c | 14 +- {lua-5.4.0 => lua-5.4.2}/src/lcode.h | 0 {lua-5.4.0 => lua-5.4.2}/src/lcorolib.c | 9 +- {lua-5.4.0 => lua-5.4.2}/src/lctype.c | 0 {lua-5.4.0 => lua-5.4.2}/src/lctype.h | 14 +- {lua-5.4.0 => lua-5.4.2}/src/ldblib.c | 29 +- {lua-5.4.0 => lua-5.4.2}/src/ldebug.c | 51 +- {lua-5.4.0 => lua-5.4.2}/src/ldebug.h | 5 + {lua-5.4.0 => lua-5.4.2}/src/ldo.c | 171 ++++--- {lua-5.4.0 => lua-5.4.2}/src/ldo.h | 7 +- {lua-5.4.0 => lua-5.4.2}/src/ldump.c | 0 {lua-5.4.0 => lua-5.4.2}/src/lfunc.c | 9 +- {lua-5.4.0 => lua-5.4.2}/src/lfunc.h | 0 {lua-5.4.0 => lua-5.4.2}/src/lgc.c | 474 +++++++++++------- {lua-5.4.0 => lua-5.4.2}/src/lgc.h | 29 +- {lua-5.4.0 => lua-5.4.2}/src/linit.c | 0 {lua-5.4.0 => lua-5.4.2}/src/liolib.c | 7 + {lua-5.4.0 => lua-5.4.2}/src/ljumptab.h | 0 {lua-5.4.0 => lua-5.4.2}/src/llex.c | 26 +- {lua-5.4.0 => lua-5.4.2}/src/llex.h | 8 +- {lua-5.4.0 => lua-5.4.2}/src/llimits.h | 26 +- {lua-5.4.0 => lua-5.4.2}/src/lmathlib.c | 0 {lua-5.4.0 => lua-5.4.2}/src/lmem.c | 2 +- {lua-5.4.0 => lua-5.4.2}/src/lmem.h | 0 {lua-5.4.0 => lua-5.4.2}/src/loadlib.c | 0 {lua-5.4.0 => lua-5.4.2}/src/lobject.c | 51 +- {lua-5.4.0 => lua-5.4.2}/src/lobject.h | 27 +- {lua-5.4.0 => lua-5.4.2}/src/lopcodes.c | 0 {lua-5.4.0 => lua-5.4.2}/src/lopcodes.h | 4 +- {lua-5.4.0 => lua-5.4.2}/src/lopnames.h | 0 {lua-5.4.0 => lua-5.4.2}/src/loslib.c | 0 {lua-5.4.0 => lua-5.4.2}/src/lparser.c | 66 +-- {lua-5.4.0 => lua-5.4.2}/src/lparser.h | 5 +- {lua-5.4.0 => lua-5.4.2}/src/lprefix.h | 0 {lua-5.4.0 => lua-5.4.2}/src/lstate.c | 109 ++-- {lua-5.4.0 => lua-5.4.2}/src/lstate.h | 143 +++--- {lua-5.4.0 => lua-5.4.2}/src/lstring.c | 20 +- {lua-5.4.0 => lua-5.4.2}/src/lstring.h | 3 +- {lua-5.4.0 => lua-5.4.2}/src/lstrlib.c | 19 +- {lua-5.4.0 => lua-5.4.2}/src/ltable.c | 46 +- {lua-5.4.0 => lua-5.4.2}/src/ltable.h | 7 +- {lua-5.4.0 => lua-5.4.2}/src/ltablib.c | 0 {lua-5.4.0 => lua-5.4.2}/src/ltm.c | 4 +- {lua-5.4.0 => lua-5.4.2}/src/ltm.h | 9 + {lua-5.4.0 => lua-5.4.2}/src/lua.c | 16 +- {lua-5.4.0 => lua-5.4.2}/src/lua.hpp | 0 {lua-5.4.0 => lua-5.4.2}/src/luac.c | 0 {lua-5.4.0 => lua-5.4.2}/src/lundump.c | 12 +- {lua-5.4.0 => lua-5.4.2}/src/lundump.h | 0 {lua-5.4.0 => lua-5.4.2}/src/lutf8lib.c | 0 {lua-5.4.0 => lua-5.4.2}/src/lvm.c | 95 ++-- {lua-5.4.0 => lua-5.4.2}/src/lvm.h | 0 {lua-5.4.0 => lua-5.4.2}/src/lzio.c | 0 {lua-5.4.0 => lua-5.4.2}/src/lzio.h | 0 orig_sources/lua-5.4.0.tar.gz | Bin 349308 -> 0 bytes orig_sources/lua-5.4.2.tar.gz | Bin 0 -> 353472 bytes 79 files changed, 1081 insertions(+), 838 deletions(-) rename {lua-5.4.0 => lua-5.4.2}/CMakeLists.txt (96%) rename {lua-5.4.0 => lua-5.4.2}/Makefile (99%) rename {lua-5.4.0 => lua-5.4.2}/README (70%) rename {lua-5.4.0 => lua-5.4.2}/doc/contents.html (99%) rename {lua-5.4.0 => lua-5.4.2}/doc/index.css (100%) rename {lua-5.4.0 => lua-5.4.2}/doc/logo.gif (100%) rename {lua-5.4.0 => lua-5.4.2}/doc/lua.1 (100%) rename {lua-5.4.0 => lua-5.4.2}/doc/lua.css (100%) rename {lua-5.4.0 => lua-5.4.2}/doc/luac.1 (100%) rename {lua-5.4.0 => lua-5.4.2}/doc/manual.css (100%) rename {lua-5.4.0 => lua-5.4.2}/doc/manual.html (98%) rename {lua-5.4.0 => lua-5.4.2}/doc/osi-certified-72x60.png (100%) rename {lua-5.4.0 => lua-5.4.2}/doc/readme.html (98%) rename {lua-5.4.0 => lua-5.4.2}/include/lauxlib.h (100%) rename {lua-5.4.0 => lua-5.4.2}/include/lua.h (99%) rename {lua-5.4.0 => lua-5.4.2}/include/luaconf.h (97%) rename {lua-5.4.0 => lua-5.4.2}/include/lualib.h (100%) rename {lua-5.4.0 => lua-5.4.2}/src/Makefile (99%) rename {lua-5.4.0 => lua-5.4.2}/src/lapi.c (96%) rename {lua-5.4.0 => lua-5.4.2}/src/lapi.h (100%) rename {lua-5.4.0 => lua-5.4.2}/src/lauxlib.c (93%) rename {lua-5.4.0 => lua-5.4.2}/src/lbaselib.c (100%) rename {lua-5.4.0 => lua-5.4.2}/src/lcode.c (99%) rename {lua-5.4.0 => lua-5.4.2}/src/lcode.h (100%) rename {lua-5.4.0 => lua-5.4.2}/src/lcorolib.c (93%) rename {lua-5.4.0 => lua-5.4.2}/src/lctype.c (100%) rename {lua-5.4.0 => lua-5.4.2}/src/lctype.h (76%) rename {lua-5.4.0 => lua-5.4.2}/src/ldblib.c (96%) rename {lua-5.4.0 => lua-5.4.2}/src/ldebug.c (93%) rename {lua-5.4.0 => lua-5.4.2}/src/ldebug.h (94%) rename {lua-5.4.0 => lua-5.4.2}/src/ldo.c (84%) rename {lua-5.4.0 => lua-5.4.2}/src/ldo.h (91%) rename {lua-5.4.0 => lua-5.4.2}/src/ldump.c (100%) rename {lua-5.4.0 => lua-5.4.2}/src/lfunc.c (97%) rename {lua-5.4.0 => lua-5.4.2}/src/lfunc.h (100%) rename {lua-5.4.0 => lua-5.4.2}/src/lgc.c (75%) rename {lua-5.4.0 => lua-5.4.2}/src/lgc.h (86%) rename {lua-5.4.0 => lua-5.4.2}/src/linit.c (100%) rename {lua-5.4.0 => lua-5.4.2}/src/liolib.c (98%) rename {lua-5.4.0 => lua-5.4.2}/src/ljumptab.h (100%) rename {lua-5.4.0 => lua-5.4.2}/src/llex.c (95%) rename {lua-5.4.0 => lua-5.4.2}/src/llex.h (91%) rename {lua-5.4.0 => lua-5.4.2}/src/llimits.h (92%) rename {lua-5.4.0 => lua-5.4.2}/src/lmathlib.c (100%) rename {lua-5.4.0 => lua-5.4.2}/src/lmem.c (99%) rename {lua-5.4.0 => lua-5.4.2}/src/lmem.h (100%) rename {lua-5.4.0 => lua-5.4.2}/src/loadlib.c (100%) rename {lua-5.4.0 => lua-5.4.2}/src/lobject.c (92%) rename {lua-5.4.0 => lua-5.4.2}/src/lobject.h (96%) rename {lua-5.4.0 => lua-5.4.2}/src/lopcodes.c (100%) rename {lua-5.4.0 => lua-5.4.2}/src/lopcodes.h (99%) rename {lua-5.4.0 => lua-5.4.2}/src/lopnames.h (100%) rename {lua-5.4.0 => lua-5.4.2}/src/loslib.c (100%) rename {lua-5.4.0 => lua-5.4.2}/src/lparser.c (96%) rename {lua-5.4.0 => lua-5.4.2}/src/lparser.h (97%) rename {lua-5.4.0 => lua-5.4.2}/src/lprefix.h (100%) rename {lua-5.4.0 => lua-5.4.2}/src/lstate.c (76%) rename {lua-5.4.0 => lua-5.4.2}/src/lstate.h (72%) rename {lua-5.4.0 => lua-5.4.2}/src/lstring.c (94%) rename {lua-5.4.0 => lua-5.4.2}/src/lstring.h (92%) rename {lua-5.4.0 => lua-5.4.2}/src/lstrlib.c (99%) rename {lua-5.4.0 => lua-5.4.2}/src/ltable.c (94%) rename {lua-5.4.0 => lua-5.4.2}/src/ltable.h (87%) rename {lua-5.4.0 => lua-5.4.2}/src/ltablib.c (100%) rename {lua-5.4.0 => lua-5.4.2}/src/ltm.c (98%) rename {lua-5.4.0 => lua-5.4.2}/src/ltm.h (90%) rename {lua-5.4.0 => lua-5.4.2}/src/lua.c (97%) rename {lua-5.4.0 => lua-5.4.2}/src/lua.hpp (100%) rename {lua-5.4.0 => lua-5.4.2}/src/luac.c (100%) rename {lua-5.4.0 => lua-5.4.2}/src/lundump.c (93%) rename {lua-5.4.0 => lua-5.4.2}/src/lundump.h (100%) rename {lua-5.4.0 => lua-5.4.2}/src/lutf8lib.c (100%) rename {lua-5.4.0 => lua-5.4.2}/src/lvm.c (95%) rename {lua-5.4.0 => lua-5.4.2}/src/lvm.h (100%) rename {lua-5.4.0 => lua-5.4.2}/src/lzio.c (100%) rename {lua-5.4.0 => lua-5.4.2}/src/lzio.h (100%) delete mode 100644 orig_sources/lua-5.4.0.tar.gz create mode 100644 orig_sources/lua-5.4.2.tar.gz diff --git a/CMakeLists.txt b/CMakeLists.txt index 96d9d05..5032f51 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.1) -project(lua LANGUAGES C VERSION 5.4.0) +project(lua LANGUAGES C VERSION 5.4.2) option(LUA_SUPPORT_DL "Support dynamic loading of compiled modules" OFF) @@ -18,4 +18,4 @@ else() endif() -add_subdirectory(lua-5.4.0) +add_subdirectory(lua-5.4.2) diff --git a/lua-5.4.0/CMakeLists.txt b/lua-5.4.2/CMakeLists.txt similarity index 96% rename from lua-5.4.0/CMakeLists.txt rename to lua-5.4.2/CMakeLists.txt index f0ec5d1..f155311 100644 --- a/lua-5.4.0/CMakeLists.txt +++ b/lua-5.4.2/CMakeLists.txt @@ -43,7 +43,7 @@ if(UNIX) find_library(LIBM m) #TODO: Redo this with find_package if(NOT LIBM) - message(FATAL_ERROR "libm not found and requred by lua") + message(FATAL_ERROR "libm not found and is required by lua") endif() target_link_libraries(lua_static INTERFACE ${LIBM}) diff --git a/lua-5.4.0/Makefile b/lua-5.4.2/Makefile similarity index 99% rename from lua-5.4.0/Makefile rename to lua-5.4.2/Makefile index 416f444..36447a0 100644 --- a/lua-5.4.0/Makefile +++ b/lua-5.4.2/Makefile @@ -46,7 +46,7 @@ TO_MAN= lua.1 luac.1 # Lua version and release. V= 5.4 -R= $V.0 +R= $V.2 # Targets start here. all: $(PLAT) diff --git a/lua-5.4.0/README b/lua-5.4.2/README similarity index 70% rename from lua-5.4.0/README rename to lua-5.4.2/README index 57572c0..bc8a9d7 100644 --- a/lua-5.4.0/README +++ b/lua-5.4.2/README @@ -1,5 +1,5 @@ -This is Lua 5.4.0, released on 18 Jun 2020. +This is Lua 5.4.2, released on 13 Nov 2020. For installation instructions, license details, and further information about Lua, see doc/readme.html. diff --git a/lua-5.4.0/doc/contents.html b/lua-5.4.2/doc/contents.html similarity index 99% rename from lua-5.4.0/doc/contents.html rename to lua-5.4.2/doc/contents.html index ffc0323..8ea0616 100644 --- a/lua-5.4.0/doc/contents.html +++ b/lua-5.4.2/doc/contents.html @@ -95,6 +95,7 @@ Freely available under the terms of the
  • 4.2 – C Closures
  • 4.3 – Registry @@ -197,7 +198,6 @@ Freely available under the terms of the debug.getregistry
    debug.getupvalue
    debug.getuservalue
    -debug.setcstacklimit
    debug.sethook
    debug.setlocal
    debug.setmetatable
    @@ -475,7 +475,6 @@ Freely available under the terms of the lua_resume
    lua_rotate
    lua_setallocf
    -lua_setcstacklimit
    lua_setfield
    lua_setglobal
    lua_sethook
    @@ -664,10 +663,10 @@ Freely available under the terms of the diff --git a/lua-5.4.0/doc/index.css b/lua-5.4.2/doc/index.css similarity index 100% rename from lua-5.4.0/doc/index.css rename to lua-5.4.2/doc/index.css diff --git a/lua-5.4.0/doc/logo.gif b/lua-5.4.2/doc/logo.gif similarity index 100% rename from lua-5.4.0/doc/logo.gif rename to lua-5.4.2/doc/logo.gif diff --git a/lua-5.4.0/doc/lua.1 b/lua-5.4.2/doc/lua.1 similarity index 100% rename from lua-5.4.0/doc/lua.1 rename to lua-5.4.2/doc/lua.1 diff --git a/lua-5.4.0/doc/lua.css b/lua-5.4.2/doc/lua.css similarity index 100% rename from lua-5.4.0/doc/lua.css rename to lua-5.4.2/doc/lua.css diff --git a/lua-5.4.0/doc/luac.1 b/lua-5.4.2/doc/luac.1 similarity index 100% rename from lua-5.4.0/doc/luac.1 rename to lua-5.4.2/doc/luac.1 diff --git a/lua-5.4.0/doc/manual.css b/lua-5.4.2/doc/manual.css similarity index 100% rename from lua-5.4.0/doc/manual.css rename to lua-5.4.2/doc/manual.css diff --git a/lua-5.4.0/doc/manual.html b/lua-5.4.2/doc/manual.html similarity index 98% rename from lua-5.4.0/doc/manual.html rename to lua-5.4.2/doc/manual.html index 257f490..6de396c 100644 --- a/lua-5.4.0/doc/manual.html +++ b/lua-5.4.2/doc/manual.html @@ -2966,26 +2966,31 @@ When you interact with the Lua API, you are responsible for ensuring consistency. In particular, you are responsible for controlling stack overflow. -You can use the function lua_checkstack -to ensure that the stack has enough space for pushing new elements. +When you call any API function, +you must ensure the stack has enough room to accommodate the results. + + +

    +There is one exception to the above rule: +When you call a Lua function +without a fixed number of results (see lua_call), +Lua ensures that the stack has enough space for all results. +However, it does not ensure any extra space. +So, before pushing anything on the stack after such a call +you should use lua_checkstack.

    Whenever Lua calls C, it ensures that the stack has space for -at least LUA_MINSTACK extra slots. +at least LUA_MINSTACK extra elements; +that is, you can safely push up to LUA_MINSTACK values into it. LUA_MINSTACK is defined as 20, so that usually you do not have to worry about stack space unless your code has loops pushing elements onto the stack. - - -

    -When you call a Lua function -without a fixed number of results (see lua_call), -Lua ensures that the stack has enough space for all results, -but it does not ensure any extra space. -So, before pushing anything in the stack after such a call -you should use lua_checkstack. +Whenever necessary, +you can use the function lua_checkstack +to ensure that the stack has enough space for pushing new elements. @@ -3044,6 +3049,49 @@ which behaves like a nil value. +

    4.1.3 – Pointers to strings

    + +

    +Several functions in the API return pointers (const char*) +to Lua strings in the stack. +(See lua_pushfstring, lua_pushlstring, +lua_pushstring, and lua_tolstring. +See also luaL_checklstring, luaL_checkstring, +and luaL_tolstring in the auxiliary library.) + + +

    +In general, +Lua's garbage collection can free or move internal memory +and then invalidate pointers to internal strings. +To allow a safe use of these pointers, +The API guarantees that any pointer to a string in a stack index +is valid while the string value at that index is not removed from the stack. +(It can be moved to another index, though.) +When the index is a pseudo-index (referring to an upvalue), +the pointer is valid while the corresponding call is active and +the corresponding upvalue is not modified. + + +

    +Some functions in the debug interface +also return pointers to strings, +namely lua_getlocal, lua_getupvalue, +lua_setlocal, and lua_setupvalue. +For these functions, the pointer is guaranteed to +be valid while the caller function is active and +the given closure (if one was given) is in the stack. + + +

    +Except for these guarantees, +the garbage collector is free to invalidate +any pointer to internal strings. + + + + +

    4.2 – C Closures

    @@ -3239,7 +3287,7 @@ Therefore, if a C function foo calls an API function and this API function yields (directly or indirectly by calling another function that yields), Lua cannot return to foo any more, -because the longjmp removes its frame from the C stack. +because the longjmp removes its frame from the C stack.

    @@ -3269,7 +3317,7 @@ After the thread resumes, it eventually will finish running the callee function. However, the callee function cannot return to the original function, -because its frame in the C stack was destroyed by the yield. +because its frame in the C stack was destroyed by the yield. Instead, Lua calls a continuation function, which was given as an argument to the callee function. As the name implies, @@ -3389,7 +3437,7 @@ depending on the situation; an interrogation mark '?' means that we cannot know how many elements the function pops/pushes by looking only at its arguments. -(For instance, they may depend on what is on the stack.) +(For instance, they may depend on what is in the stack.) The third field, x, tells whether the function may raise errors: '-' means the function never raises any error; @@ -3408,7 +3456,7 @@ and therefore may raise any errors.

    Converts the acceptable index idx into an equivalent absolute index -(that is, one that does not depend on the stack top). +(that is, one that does not depend on the stack size). @@ -3678,7 +3726,7 @@ of numeric arguments and returns their average and their sum:

    int lua_checkstack (lua_State *L, int n);

    -Ensures that the stack has space for at least n extra slots, +Ensures that the stack has space for at least n extra elements, that is, that you can safely push up to n values into it. It returns false if it cannot fulfill the request, either because it would cause the stack @@ -3686,7 +3734,7 @@ to be greater than a fixed maximum size (typically at least several thousand elements) or because it cannot allocate memory for the extra space. This function never shrinks the stack; -if the stack already has space for the extra slots, +if the stack already has space for the extra elements, it is left unchanged. @@ -4443,6 +4491,10 @@ plus an associated block of raw memory with size bytes.

    The function returns the address of the block of memory. +Lua ensures that this address is valid as long as +the corresponding userdata is alive (see §2.5). +Moreover, if the userdata is marked for finalization (see §2.5.3), +its address is valid at least until the call to its finalizer. @@ -4600,13 +4652,18 @@ except that it allows the called function to yield (see §4.5


    lua_pop

    -[-n, +0, –] +[-n, +0, e]

    void lua_pop (lua_State *L, int n);

    Pops n elements from the stack. +

    +This function can run arbitrary code when removing an index +marked as to-be-closed from the stack. + + @@ -4688,7 +4745,7 @@ This function is equivalent to lua_pushcclosur

    Pushes onto the stack a formatted string -and returns a pointer to this string. +and returns a pointer to this string (see §4.1.3). It is similar to the ISO C function sprintf, but has two important differences. First, @@ -4788,7 +4845,7 @@ including embedded zeros.

    -Returns a pointer to the internal copy of the string. +Returns a pointer to the internal copy of the string (see §4.1.3). @@ -4829,7 +4886,7 @@ the function returns.

    -Returns a pointer to the internal copy of the string. +Returns a pointer to the internal copy of the string (see §4.1.3).

    @@ -5273,7 +5330,7 @@ for the "newindex" event (see §2.4).


    lua_settop

    -[-?, +?, –] +[-?, +?, e]

    void lua_settop (lua_State *L, int index);

    @@ -5284,6 +5341,11 @@ then the new elements are filled with nil. If index is 0, then all stack elements are removed. +

    +This function can run arbitrary code when removing an index +marked as to-be-closed from the stack. + + @@ -5399,7 +5461,7 @@ otherwise, returns NULL.


    lua_toclose

    -[-0, +0, v] +[-0, +0, m]

    void lua_toclose (lua_State *L, int index);

    @@ -5423,11 +5485,19 @@ that is equal to or below an active to-be-closed index.

    -This function can raise an out-of-memory error. -In that case, the value in the given index is immediately closed, +In the case of an out-of-memory error, +the value in the given index is immediately closed, as if it was already marked. +

    +Note that, both in case of errors and of a regular return, +by the time the __close metamethod runs, +the C stack was already unwound, +so that any automatic C variable declared in the calling function +will be out of scope. + + @@ -5482,18 +5552,12 @@ when lua_tolstring is applied to keys during a table traversal.)

    lua_tolstring returns a pointer -to a string inside the Lua state. +to a string inside the Lua state (see §4.1.3). This string always has a zero ('\0') after its last character (as in C), but can contain other zeros in its body. -

    -Because Lua has garbage collection, -there is no guarantee that the pointer returned by lua_tolstring -will be valid after the corresponding Lua value is removed from the stack. - - @@ -5944,7 +6008,7 @@ true if the function is a vararg function

  • ftransfer: -the index on the stack of the first value being "transferred", +the index in the stack of the first value being "transferred", that is, parameters in a call or return values in a return. (The other values are in consecutive indices.) Using this index, you can access and modify these values @@ -6141,7 +6205,7 @@ an identification of the activation record of the function executing at a given level. Level 0 is the current running function, whereas level n+1 is the function that has called level n -(except for tail calls, which do not count on the stack). +(except for tail calls, which do not count in the stack). When called with a level greater than the stack depth, lua_getstack returns 0; otherwise it returns 1. @@ -6218,24 +6282,6 @@ calling lua_yield with nresults

    lua_setcstacklimit

    -[-0, +0, –] -

    int (lua_setcstacklimit) (lua_State *L, unsigned int limit);
    - -

    -Sets a new limit for the C stack. -This limit controls how deeply nested calls can go in Lua, -with the intent of avoiding a stack overflow. -Returns the old limit in case of success, -or zero in case of error. -For more details about this function, -see debug.setcstacklimit, -its equivalent in the standard library. - - - - -


    lua_sethook

    [-0, +0, –]

    void lua_sethook (lua_State *L, lua_Hook f, int mask, int count);
    @@ -6259,8 +6305,7 @@ For each event, the hook is called as explained below: