[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Iterating over a table from C
- From: Duncan Cross <duncan.cross@...>
- Date: Sat, 5 Feb 2011 16:18:06 +0000
On Sat, Feb 5, 2011 at 4:05 PM, Philip Pemberton <lists@philpem.me.uk> wrote:
> Hi guys,
>
> Does anyone know if it's possible to iterate over the contents of a
> table from C?
Yes, it's possible. The C API function you want to investigate is
lua_next(). There is a good example of how to use it for a traversal
loop in the reference manual:
http://www.lua.org/manual/5.1/manual.html#lua_next
-Duncan