Next: , Previous: slua_tbl_el_n, Up: Manipulating Tables


A.2.7 slua_tbl_el_tbl

get a table element from a table

Synopsis

     #include <luasup/luasup.h>
     
     
     
lua_Object slua_tbl_el_tbl( lua_Object table, const char *index );

Parameters

lua_Object table
the table containing the data
const char *index
the index of the element

Description

retrieve the value of an element in a table. The value should be a table. The table handle is returned (no copy is made).

Returns

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.

Author

Diab Jerius