Imported from ../lua-3.0.tar.gz.
[lua.git] / src / hash.h
blob1bc758b7b2fdb204f5c6d05ec9e09192f467e9d8
1 /*
2 ** hash.h
3 ** hash manager for lua
4 ** $Id: hash.h,v 2.16 1997/05/14 18:38:29 roberto Exp $
5 */
7 #ifndef hash_h
8 #define hash_h
10 #include "types.h"
11 #include "opcode.h"
13 typedef struct node {
14 TObject ref;
15 TObject val;
16 } Node;
18 typedef struct Hash {
19 struct Hash *next;
20 Node *node;
21 int nhash;
22 int nuse;
23 int htag;
24 char mark;
25 } Hash;
28 int lua_equalObj (TObject *t1, TObject *t2);
29 int luaI_redimension (int nhash);
30 Hash *lua_createarray (int nhash);
31 void lua_hashmark (Hash *h);
32 Hash *luaI_hashcollector (long *count);
33 void luaI_hashcallIM (Hash *l);
34 void luaI_hashfree (Hash *frees);
35 TObject *lua_hashget (Hash *t, TObject *ref);
36 TObject *lua_hashdefine (Hash *t, TObject *ref);
37 void lua_next (void);
39 #endif