lua-users home
lua-l archive

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


>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