[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: What does "slot" mean for Lua?
- From: 孙世龙 sunshilong <sunshilong369@...>
- Date: Thu, 24 Sep 2020 20:09:16 +0800
Hi, Viacheslav Usov
>Even if some of what they might be true today, you should be very
>careful about statements made so long ago, and you should try to
>confirm them with the current documentation.
Thanks a lot.
As per the manual that is contained in the repo of Lua(
https://github.com/lua/lua/blob/master/manual/manual.of),
which says that [emphasis mine]:
Whenever Lua calls C, it ensures that the stack has space for
at least LUA_MINSTACK extra **slots**.
^^^^^^^^^^^^^^^^^^^^^^^^^^
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.
The same question arises, what does the "slots" mean for Lua?
Thank you for your attention to this matter.
Best Regards
Sunshilong
On Thu, Sep 24, 2020 at 7:59 PM Viacheslav Usov <via.usov@gmail.com> wrote:
>
> On Thu, Sep 24, 2020 at 10:48 AM 孙世龙 sunshilong <sunshilong369@gmail.com> wrote:
>
> > As per the documentation(https://www.lua.org/pil/24.2.1.html),
>
> This is not the documentation. It is a book that complements the
> documentation, and it describes a version of Lua that was current 15
> years ago.
>
> The current documentation is at https://www.lua.org/manual/5.4/
>
> The latest edition of the book Programming in Lua targets Lua 5.3 and
> it is not available at lua.org free of charge.
>
> The other page that you found is also not documentation, and it was
> written more than 10 years ago.
>
> Even if some of what they might be true today, you should be very
> careful about statements made so long ago, and you should try to
> confirm them with the current documentation.
>
> Cheers,
> V.