Imported from ../lua-1.0.tar.gz.
[lua.git] / hash.h
blob28c50317b6bd44ff1622e815ea1bce91bfc26901
1 /*
2 ** hash.h
3 ** hash manager for lua
4 ** Luiz Henrique de Figueiredo - 17 Aug 90
5 ** Modified by Waldemar Celes Filho
6 ** 26 Apr 93
7 */
9 #ifndef hash_h
10 #define hash_h
12 typedef struct node
14 Object ref;
15 Object val;
16 struct node *next;
17 } Node;
19 typedef struct Hash
21 char mark;
22 unsigned int nhash;
23 Node **list;
24 } Hash;
26 #define markarray(t) ((t)->mark)
28 Hash *lua_hashcreate (unsigned int nhash);
29 void lua_hashdelete (Hash *h);
30 Object *lua_hashdefine (Hash *t, Object *ref);
31 void lua_hashmark (Hash *h);
33 void lua_next (void);
35 #endif