aboutsummaryrefslogtreecommitdiff
path: root/ltable.h
diff options
context:
space:
mode:
Diffstat (limited to 'ltable.h')
-rw-r--r--ltable.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/ltable.h b/ltable.h
index 4b9b11b3..836842da 100644
--- a/ltable.h
+++ b/ltable.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.h,v 2.7 2005/04/25 19:24:10 roberto Exp roberto $ 2** $Id: ltable.h,v 2.8 2005/06/06 13:30:25 roberto Exp roberto $
3** Lua tables (hash) 3** Lua tables (hash)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -11,15 +11,13 @@
11 11
12 12
13#define gnode(t,i) (&(t)->node[i]) 13#define gnode(t,i) (&(t)->node[i])
14#define gkey(n) (&(n)->i_key) 14#define gkey(n) (&(n)->i_key.nk)
15#define gval(n) (&(n)->i_val) 15#define gval(n) (&(n)->i_val)
16#define gnext(n) ((n)->i_key.next) 16#define gnext(n) ((n)->i_key.nk.next)
17 17
18#define key2tval(n) (cast(const TValue *, gkey(n))) 18#define key2tval(n) (&(n)->i_key.tvk)
19 19
20 20
21LUAI_DATA const Node luaH_dummynode;
22
23LUAI_FUNC const TValue *luaH_getnum (Table *t, int key); 21LUAI_FUNC const TValue *luaH_getnum (Table *t, int key);
24LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key); 22LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key);
25LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); 23LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key);
@@ -35,5 +33,9 @@ LUAI_FUNC int luaH_getn (Table *t);
35/* exported only for debugging */ 33/* exported only for debugging */
36LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key); 34LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key);
37 35
36#define luaH_dummynode (&luaH_dummynode_)
37
38LUAI_DATA const Node luaH_dummynode_;
39
38 40
39#endif 41#endif