Defines | Functions

lua/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.

Defines

#define gnode(t, i)   (&(t)->node[i])
#define gkey(n)   (&(n)->i_key.tvk)
#define gval(n)   (&(n)->i_val)
#define gnext(n)   ((n)->i_key.nk.next)
#define invalidateTMcache(t)   ((t)->flags = 0)

Functions

LUAI_FUNC const TValueluaH_getint (Table *t, int key)
LUAI_FUNC void luaH_setint (lua_State *L, Table *t, int key, TValue *value)
LUAI_FUNC const TValueluaH_getstr (Table *t, TString *key)
LUAI_FUNC const TValueluaH_get (Table *t, const TValue *key)
LUAI_FUNC TValueluaH_newkey (lua_State *L, Table *t, const TValue *key)
LUAI_FUNC TValueluaH_set (lua_State *L, Table *t, const TValue *key)
LUAI_FUNC TableluaH_new (lua_State *L)
LUAI_FUNC void luaH_resize (lua_State *L, Table *t, int nasize, int nhsize)
LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize)
LUAI_FUNC void luaH_free (lua_State *L, Table *t)
LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key)
LUAI_FUNC int luaH_getn (Table *t)

Define Documentation

#define gkey (   n  )     (&(n)->i_key.tvk)
#define gnext (   n  )     ((n)->i_key.nk.next)

Definition at line 16 of file ltable.h.

Referenced by findindex(), luaH_get(), luaH_getint(), luaH_getstr(), luaH_newkey(), and setnodevector().

#define gnode (   t,
  i 
)    (&(t)->node[i])
#define gval (   n  )     (&(n)->i_val)
#define invalidateTMcache (   t  )     ((t)->flags = 0)

Definition at line 18 of file ltable.h.

Referenced by lua_rawset(), and luaV_settable().


Function Documentation

LUAI_FUNC void luaH_free ( lua_State L,
Table t 
)

Definition at line 371 of file ltable.c.

References Table::array, cast, isdummy, luaM_free, luaM_freearray, Table::node, Table::sizearray, and sizenode.

Referenced by freeobj().

Here is the caller graph for this function:

LUAI_FUNC const TValue* luaH_get ( Table t,
const TValue key 
)

Definition at line 472 of file ltable.c.

References cast_num, gkey, gnext, gval, lua_number2int, LUA_TNIL, LUA_TNUMBER, LUA_TSTRING, luaH_getint(), luaH_getstr(), luaV_rawequalobj, mainposition(), nvalue, rawtsvalue, and ttypenv.

Referenced by lua_rawget(), lua_rawgetp(), luaH_set(), luaV_gettable(), and luaV_settable().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC const TValue* luaH_getint ( Table t,
int  key 
)

Definition at line 438 of file ltable.c.

References Table::array, cast, cast_num, gkey, gnext, gval, hashnum(), nvalue, Table::sizearray, and ttisnumber.

Referenced by lua_getglobal(), lua_load(), lua_rawgeti(), lua_setglobal(), luaH_get(), luaH_setint(), and unbound_search().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC int luaH_getn ( Table t  ) 

Definition at line 551 of file ltable.c.

References Table::array, isdummy, Table::node, Table::sizearray, ttisnil, and unbound_search().

Referenced by lua_rawlen(), and luaV_objlen().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC const TValue* luaH_getstr ( Table t,
TString key 
)

Definition at line 458 of file ltable.c.

References eqstr, gkey, gnext, gval, hashstr, rawtsvalue, and ttisstring.

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

Here is the caller graph for this function:

LUAI_FUNC Table* luaH_new ( lua_State L  ) 

Definition at line 360 of file ltable.c.

References Table::array, cast_byte, Table::flags, GCObject::h, LUA_TTABLE, luaC_newobj(), Table::metatable, setnodevector(), and Table::sizearray.

Referenced by collectvalidlines(), init_registry(), lua_createtable(), luaV_execute(), and open_func().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC TValue* luaH_newkey ( lua_State L,
Table t,
const TValue key 
)

Definition at line 397 of file ltable.c.

References getfreepos(), gkey, gnext, gval, isdummy, lua_assert, luaC_barrierback, luaG_runerror(), luaH_set(), mainposition(), nvalue, obj2gco, rehash(), setnilvalue, setobj2t, ttisnil, and ttisnumber.

Referenced by luaH_set(), luaH_setint(), and luaV_settable().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 161 of file ltable.c.

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

Referenced by lua_next().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC void luaH_resize ( lua_State L,
Table t,
int  nasize,
int  nhsize 
)

Definition at line 296 of file ltable.c.

References Table::array, cast, gkey, gval, isdummy, Table::lsizenode, luaH_set(), luaH_setint(), luaM_freearray, luaM_reallocvector, Table::node, setarrayvector(), setnodevector(), setobjt2t, Table::sizearray, ttisnil, and twoto.

Referenced by init_registry(), lua_createtable(), luaH_resizearray(), luaV_execute(), and rehash().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC void luaH_resizearray ( lua_State L,
Table t,
int  nasize 
)

Definition at line 329 of file ltable.c.

References isdummy, luaH_resize(), Table::node, and sizenode.

Referenced by luaV_execute().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC TValue* luaH_set ( lua_State L,
Table t,
const TValue key 
)

Definition at line 501 of file ltable.c.

References cast, luaH_get(), luaH_newkey(), and luaO_nilobject.

Referenced by addk(), lua_rawset(), lua_rawsetp(), luaH_newkey(), luaH_resize(), and luaX_newstring().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC void luaH_setint ( lua_State L,
Table t,
int  key,
TValue value 
)

Definition at line 509 of file ltable.c.

References cast, cast_num, luaH_getint(), luaH_newkey(), luaO_nilobject, setnvalue, and setobj2t.

Referenced by collectvalidlines(), init_registry(), lua_rawseti(), luaH_resize(), and luaV_execute().

Here is the call graph for this function:

Here is the caller graph for this function:

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:07:58 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs