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?

I'm trying to update a lua-4.0 extension module to lua-5.0-beta
that checked using this sort of approach:

  luaL_check_type(L, index, LUA_TTABLE);  /* is it a table? */
  n = lua_getn(L, index);
  if( n != some_number ) { blah... }

Thanks,
Dean.

--
E-Mail:  sessile@in-gen.net