[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ Lua C API ] lua_upvalueid - index > # upvalues?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sat, 26 Sep 2020 11:20:08 -0300
> The Manual for Lua (pretty consistently across versions) says that you are not supposed to call lua_upvalueid for upvalues that do not exist:
>
> So... what happens if you do? Undefined behavior, essentially?
Yes. The C API does not hold your hand. If you give it bad input, then
bad things may happen.