diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-01-25 10:30:11 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-01-25 10:30:11 -0200 |
commit | 1b45e967b4dcb234551c2a731147b111584f4145 (patch) | |
tree | 4a257873ccadd2779df799eb8f41f146407a4081 /ltable.h | |
parent | 933bead92e48cdd8f2c9b5953854270e98d58c9a (diff) | |
download | lua-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.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 | |||
18 | Hash *luaH_new (int nhash); | 20 | Hash *luaH_new (int nhash); |
19 | void luaH_free (Hash *frees); | 21 | void luaH_free (Hash *frees); |
20 | TObject *luaH_get (Hash *t, TObject *ref); | 22 | Node *luaH_present (Hash *t, TObject *ref); |
21 | TObject *luaH_set (Hash *t, TObject *ref); | 23 | TObject *luaH_set (Hash *t, TObject *ref); |
22 | Node *luaH_next (Hash *t, TObject *r); | 24 | Node *luaH_next (Hash *t, TObject *r); |
23 | void luaH_setint (Hash *t, int ref, TObject *val); | 25 | void luaH_setint (Hash *t, int ref, TObject *val); |