[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Can C code recognize, whether Lua inside some loop/block? (for/while/repeat/if)
- From: Flyer31 Test <flyer31@...>
- Date: Wed, 16 Feb 2022 08:29:56 +0100
Hello,
in my C code I want to define some special Lua functions, which should
be only invoked inside a sort of "main function", and these functions
also should NOT be invoiked inside any code blocks if...end, as well
as not in any loops for ...end / while ...end / repeat ... until.
Witth the debug interface and lua_getinfo I can get info about the
function currently active ... so I can restrict the invocation of this
"special function" easily to be called only insde my "main function".
But I did not find an easy way to know, whether any "block"
(if/for/while/do/repeat) is active. Is there a way for my C code to
get this information?