[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: iterate over tables with C api in 4.0
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 4 Sep 2001 17:37:09 -0300 (EST)
>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.
--lhf