summaryrefslogtreecommitdiff
path: root/hash.h
blob: 4fbde55c6f4b83090062a1427c1ee6f02cf33693 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
** hash.h
** hash manager for lua
** $Id: hash.h,v 2.15 1997/03/31 14:02:58 roberto Exp roberto $
*/

#ifndef hash_h
#define hash_h

#include "types.h"
#include "opcode.h"

typedef struct node {
 TObject ref;
 TObject val;
} Node;

typedef struct Hash {
  struct Hash *next;
  Node *node;
  int nhash;
  int nuse;
  int htag;
  char mark;
} Hash;


int      lua_equalObj (TObject *t1, TObject *t2);
int      luaI_redimension (int nhash);
Hash    *lua_createarray (int nhash);
void     lua_hashmark (Hash *h);
Hash    *luaI_hashcollector (long *count);
void luaI_hashcallIM (Hash *l);
void luaI_hashfree (Hash *frees);
TObject  *lua_hashget (Hash *t, TObject *ref);
TObject 	*lua_hashdefine (Hash *t, TObject *ref);
void     lua_next (void);

#endif