Lua 5.1.4: ltable.h


L0001    /*
L0002    ** $Id: ltable.h,v 2.10.1.1 2007/12/27 13:02:25 roberto Exp $
L0003    ** Lua tables (hash)
L0004    ** See Copyright Notice in lua.h
L0005    */
L0006    
L0007    #ifndef ltable_h
L0008    #define ltable_h
L0009    
L0010    #include "lobject.h"
L0011    
L0012    
L0013    #define gnode(t,i)	(&(t)->node[i])
Table*, int -> Node* Gets i-th node in table's hashpart array. (Question: why isn't there a corresponding function to get the i-th node in table's arraypart array? or why have this macro at all?)
L0014
#define gkey(n) (&(n)->i_key.nk)
Node* -> TValue* Gets node key's TValue.
L0015
#define gval(n) (&(n)->i_val)
Node* -> TValue* Gets node value's TValue.
L0016
#define gnext(n) ((n)->i_key.nk.next)
Node* -> Node* Gets node following given node in chain of nodes.
L0017 L0018
#define key2tval(n) (&(n)->i_key.tvk) L0019 L0020 L0021 LUAI_FUNC const TValue *luaH_getnum (Table *t, int key); L0022 LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key); L0023 LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); L0024 LUAI_FUNC TValue *luaH_setstr (lua_State *L, Table *t, TString *key); L0025 LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); L0026 LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); L0027 LUAI_FUNC Table *luaH_new (lua_State *L, int narray, int lnhash); L0028 LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize); L0029 LUAI_FUNC void luaH_free (lua_State *L, Table *t); L0030 LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); L0031 LUAI_FUNC int luaH_getn (Table *t); L0032 L0033 L0034 #if defined(LUA_DEBUG) L0035 LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key); L0036 LUAI_FUNC int luaH_isdummy (Node *n); L0037 #endif L0038 L0039 L0040 #endif

Generated by pretty.lua