[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua_rawget and lua_rawset expect tables
- From: Flyer31 Test <flyer31@...>
- Date: Thu, 17 Feb 2022 10:43:28 +0100
What do you mean by this? lua_gettable returns t[k] - how can t be NOT
a table in this case?
(sorry, I am newbe to Lua, I hope not too stupid question).
On Thu, Feb 17, 2022 at 9:01 AM Xmilia Hermit <xmilia.hermit@gmail.com> wrote:
>
> The Lua C API functions lua_rawget and lua_rawset expect a table which
> is used without any runtime check (except an API check)
> (https://github.com/lua/lua/blob/5d708c3f9cae12820e415d4f89c9eacbe2ab964b/lapi.c#L736).
> However, the manual
> (https://www.lua.org/manual/5.4/manual.html#lua_rawget) states for these
> functions that they are similar to lua_gettable which is not restricted
> to tables.
> Since this seems not very clear
> (https://github.com/LuaJIT/LuaJIT/issues/810) it would be nice if the
> manual would make it clear for these two functions that tables are expected.
>
> Regards,
> Xmilia