rpm  4.5
Macros | Functions
ltable.h File Reference
#include "lobject.h"
Include dependency graph for ltable.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#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)
 

Macro Definition Documentation

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

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 
)
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, Node::next, 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, Node::next, tsvalue, and ttisstring.

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

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 
)
int luaH_next ( lua_State L,
Table t,
StkId  key 
)

Definition at line 159 of file ltable.c.

References Table::array, cast, gkey, gnode, gval, luaH_index(), setnvalue, setobj2s, Table::sizearray, sizenode, and ttisnil.

Referenced by lua_next().

TObject* luaH_set ( lua_State L,
Table t,
const TObject key 
)
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(), luaV_execute(), and resize().