Imported from ../lua-3.2.tar.gz.
[lua.git] / src / ltable.h
blob49b485f2d3ac2082c8946130d9582f8142fc6e93
1 /*
2 ** $Id: ltable.h,v 1.11 1999/02/23 14:57:28 roberto Exp $
3 ** Lua tables (hash)
4 ** See Copyright Notice in lua.h
5 */
7 #ifndef ltable_h
8 #define ltable_h
10 #include "lobject.h"
13 #define node(t,i) (&(t)->node[i])
14 #define ref(n) (&(n)->ref)
15 #define val(n) (&(n)->val)
16 #define nhash(t) ((t)->nhash)
18 #define luaH_get(t,ref) (val(luaH_present((t), (ref))))
19 #define luaH_move(t,from,to) (luaH_setint(t, to, luaH_getint(t, from)))
21 Hash *luaH_new (int nhash);
22 void luaH_free (Hash *frees);
23 Node *luaH_present (Hash *t, TObject *key);
24 void luaH_set (Hash *t, TObject *ref, TObject *val);
25 int luaH_pos (Hash *t, TObject *r);
26 void luaH_setint (Hash *t, int ref, TObject *val);
27 TObject *luaH_getint (Hash *t, int ref);
30 #endif