aboutsummaryrefslogtreecommitdiff
path: root/ltable.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-01-25 10:30:11 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-01-25 10:30:11 -0200
commit1b45e967b4dcb234551c2a731147b111584f4145 (patch)
tree4a257873ccadd2779df799eb8f41f146407a4081 /ltable.h
parent933bead92e48cdd8f2c9b5953854270e98d58c9a (diff)
downloadlua-1b45e967b4dcb234551c2a731147b111584f4145.tar.gz
lua-1b45e967b4dcb234551c2a731147b111584f4145.tar.bz2
lua-1b45e967b4dcb234551c2a731147b111584f4145.zip
table entries with ref=null always have val=null too.
Diffstat (limited to 'ltable.h')
-rw-r--r--ltable.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/ltable.h b/ltable.h
index 87a01f83..e03f9d5c 100644
--- a/ltable.h
+++ b/ltable.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.h,v 1.7 1998/12/30 13:14:46 roberto Exp $ 2** $Id: ltable.h,v 1.8 1999/01/04 12:54:33 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*/
@@ -15,9 +15,11 @@
15#define val(n) (&(n)->val) 15#define val(n) (&(n)->val)
16#define nhash(t) ((t)->nhash) 16#define nhash(t) ((t)->nhash)
17 17
18#define luaH_get(t,ref) (val(luaH_present((t), (ref))))
19
18Hash *luaH_new (int nhash); 20Hash *luaH_new (int nhash);
19void luaH_free (Hash *frees); 21void luaH_free (Hash *frees);
20TObject *luaH_get (Hash *t, TObject *ref); 22Node *luaH_present (Hash *t, TObject *ref);
21TObject *luaH_set (Hash *t, TObject *ref); 23TObject *luaH_set (Hash *t, TObject *ref);
22Node *luaH_next (Hash *t, TObject *r); 24Node *luaH_next (Hash *t, TObject *r);
23void luaH_setint (Hash *t, int ref, TObject *val); 25void luaH_setint (Hash *t, int ref, TObject *val);