lua-users home
lua-l archive

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

>What is the "approved" way to iterate over the keys and values of a
>non-vector-style Lua table from C?

The only thing to beware of is to avoid using lua_tostring on keys that are
not strings because unfortunately lua_tostring *changes* the value and this
confuses lua_next. To avoid this you must explicit test the type of the keys
using lua_tag.