lua-users home
lua-l archive

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


> 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