lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Why didn't you specify that you need C API solution?

Use lua_getfield or lua_rawget with lua_type and LUA_TNIL
On 14 Jan 2021, 14:43 +0300, 孙世龙 sunshilong <sunshilong369@gmail.com>, wrote:
Simply check if yourtable[yourkey] is nil
This is a Lua script.
How to achieve this goal(i.e the subject) by C api?

On Thu, Jan 14, 2021 at 6:07 PM Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:

Cross-posted to
https://stackoverflow.com/questions/65716853/how-to-find-out-whether-there-is-a-specific-key-for-a-given-lua-table-besides-tr