new hash function; hash value for strings are kept with the string

This commit is contained in:
Roberto Ierusalimschy
1994-11-25 17:27:03 -02:00
parent fbfa1cbe9b
commit 10bdd83844
2 changed files with 5 additions and 2 deletions

3
tree.h
View File

@@ -1,7 +1,7 @@
/*
** tree.h
** TecCGraf - PUC-Rio
** $Id: tree.h,v 1.5 1994/11/18 19:27:38 roberto Exp roberto $
** $Id: tree.h,v 1.6 1994/11/23 14:31:11 roberto Stab roberto $
*/
#ifndef tree_h
@@ -13,6 +13,7 @@
typedef struct TaggedString
{
unsigned long hash; /* 0 if not initialized */
char marked; /* for garbage collection */
char str[1]; /* \0 byte already reserved */
} TaggedString;