[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: iterating over table
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 13 Dec 2002 09:49:52 -0200 (EDT)
>How would I iterate over the keys of a table using the c api? i.e.,
> for key, val in table do
>lua_gettable() requires a key and lua_rawgeti appears to only work for
>arrays.
Use lua_next. See http://lua-users.org/lists/lua-l/2002-11/msg00132.html .
--lhf