[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Exit one Lua state from a (C) API function
- From: Viacheslav Usov <via.usov@...>
- Date: Fri, 26 Feb 2021 10:42:55 +0100
On Thu, Feb 25, 2021 at 9:58 PM bel <bel2125@gmail.com> wrote:
> Is there some recommended method to do this?
Unless you control tightly all the "C" [1] code, including all the
libraries, that interacts with a given state, that is generally
impossible. Because "C" code will generally expect that no transfer of
control can happen across lua_pcall (and the like) boundaries.
Whatever you do, you will either have to violate the expectation, with
generally unpredictable consequences, or have to be limited by it.
[1] "C" meaning whatever uses the Lua "C" API, which is not
necessarily in the C language.
Cheers,
V.