Next: slua_tbl_el_exists, Previous: slua_tbl_el_n, Up: Manipulating Tables
get a table element from a table
#include <luasup/luasup.h>lua_Object slua_tbl_el_tbl( lua_Object table, const char *index );
lua_Object table
- the table containing the data
const char *index
- the index of the element
retrieve the value of an element in a table. The value should be a table. The table handle is returned (no copy is made).
It returns the table handle, or LUA_NOOBJECT
if the element
didn't exist or wasn't a table.
exist, and `-1' if it was unable to allocate enough memory for
the string. If the element doesn't exist, *value
is unchanged.
Diab Jerius