[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Getting size of table from C
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 10 Feb 2003 09:44:11 +0000
> Would someone please post a quick example of how to use
> 'lua_call' to call 'table.getn()' on a table that's being
> passed from a script?
This functionality will be in the auxlib in the final version of 5.0.
(There will be "luaL_getn" and "luaL_setn"). For now use that patch to
call "table.getn".
(It uses the same implementation that "table" uses, but it keeps the
table with sizes in the registry, rather than in upvalues.)
-- Roberto