Next: , Previous: slua_tbl_el_s, Up: Manipulating Tables


A.2.5 slua_tbl_el_si

get a string element from a table

Synopsis

     #include <luasup/luasup.h>
     
     
     
char *slua_tbl_el_si( 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 representable as a string, as a pointer to the string is returned. This points to the Lua object; it differs from slua_tbl_el_s in that it doesn't allocate any memory for the string.

Returns

It returns a pointer to the string upon succes, NULL if the element didn't exist.

Author

Diab Jerius