lua/ltable.h File Reference

#include "lobject.h"

Go to the source code of this file.

Defines

#define gnode(t, i)   (&(t)->node[i])
#define gkey(n)   (&(n)->i_key)
#define gval(n)   (&(n)->i_val)

Functions

const TObjectluaH_getnum (Table *t, int key)
TObjectluaH_setnum (lua_State *L, Table *t, int key)
const TObjectluaH_getstr (Table *t, TString *key)
const TObjectluaH_get (Table *t, const TObject *key)
TObjectluaH_set (lua_State *L, Table *t, const TObject *key)
TableluaH_new (lua_State *L, int narray, int lnhash)
void luaH_free (lua_State *L, Table *t)
int luaH_next (lua_State *L, Table *t, StkId key)
NodeluaH_mainposition (const Table *t, const TObject *key)


Define Documentation

#define gkey (  )     (&(n)->i_key)

Definition at line 14 of file ltable.h.

Referenced by cleartablekeys(), f_luaopen(), luaH_getany(), luaH_getnum(), luaH_getstr(), newkey(), removekey(), resize(), setnodevector(), traversetable(), and travglobals().

#define gnode ( t,
 )     (&(t)->node[i])

Definition at line 13 of file ltable.h.

Referenced by cleartablekeys(), cleartablevalues(), luaH_index(), setnodevector(), traversetable(), and travglobals().

#define gval (  )     (&(n)->i_val)

Definition at line 15 of file ltable.h.

Referenced by cleartablevalues(), f_luaopen(), luaH_getany(), luaH_getnum(), luaH_getstr(), luaH_index(), newkey(), removekey(), resize(), setnodevector(), traversetable(), and travglobals().


Function Documentation

void luaH_free ( lua_State L,
Table t 
)

Definition at line 361 of file ltable.c.

References Table::array, Table::lsizenode, luaM_freearray, luaM_freelem, Table::node, Table::sizearray, and sizenode.

Referenced by freeobj().

const TObject* luaH_get ( Table t,
const TObject key 
)

Definition at line 495 of file ltable.c.

References cast, lua_number2int, luaH_getany(), luaH_getnum(), luaH_getstr(), nvalue, tsvalue, and ttype.

Referenced by addk(), lua_rawget(), luaH_index(), luaH_set(), luaV_gettable(), and newkey().

const TObject* luaH_getnum ( Table t,
int  key 
)

Definition at line 462 of file ltable.c.

References Table::array, cast, gkey, gval, hashnum(), luaO_nilobject, nvalue, and ttisnumber.

Referenced by lua_rawgeti(), luaH_get(), and luaH_setnum().

const TObject* luaH_getstr ( Table t,
TString key 
)

Definition at line 481 of file ltable.c.

References gkey, gval, hashstr, luaO_nilobject, tsvalue, and ttisstring.

Referenced by Arith(), luaH_get(), luaT_gettm(), and luaT_gettmbyobj().

Node* luaH_mainposition ( const Table t,
const TObject key 
)

Definition at line 101 of file ltable.c.

References bvalue, gcvalue, hashboolean, hashnum(), hashpointer, hashstr, nvalue, pvalue, tsvalue, and ttype.

Referenced by luaH_getany(), and newkey().

Table* luaH_new ( lua_State L,
int  narray,
int  lnhash 
)

Definition at line 345 of file ltable.c.

References Table::array, cast, defaultmeta, Table::flags, hvalue, Table::lsizenode, luaC_link(), luaM_new, Table::metatable, Table::node, setarrayvector(), setnodevector(), Table::sizearray, and valtogco.

Referenced by adjust_varargs(), f_luaopen(), lua_newtable(), and open_func().

int luaH_next ( lua_State L,
Table t,
StkId  key 
)

Definition at line 159 of file ltable.c.

References Table::array, cast, luaH_index(), setnvalue, setobj2s, Table::sizearray, and ttisnil.

Referenced by lua_next().

TObject* luaH_set ( lua_State L,
Table t,
const TObject key 
)

Definition at line 510 of file ltable.c.

References cast, Table::flags, luaG_runerror(), luaH_get(), luaO_nilobject, newkey(), nvalue, ttisnil, and ttisnumber.

Referenced by addk(), adjust_varargs(), lua_rawset(), luaV_settable(), and resize().

TObject* luaH_setnum ( lua_State L,
Table t,
int  key 
)

Definition at line 526 of file ltable.c.

References cast, luaH_getnum(), luaO_nilobject, newkey(), and setnvalue.

Referenced by adjust_varargs(), lua_rawseti(), and resize().


Generated on Fri Oct 12 08:44:56 2007 for rpm by  doxygen 1.5.2