From c5fee7615e979e3a39af44614f82938519dedb68 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 11 Oct 1999 14:13:42 -0200 Subject: new implementation for string hashing, with chaining. --- lstring.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'lstring.h') diff --git a/lstring.h b/lstring.h index 7fc50810..c1323808 100644 --- a/lstring.h +++ b/lstring.h @@ -1,5 +1,5 @@ /* -** $Id: lstring.h,v 1.8 1999/08/16 20:52:00 roberto Exp roberto $ +** $Id: lstring.h,v 1.9 1999/10/04 17:51:04 roberto Exp roberto $ ** String table (keep all strings handled by Lua) ** See Copyright Notice in lua.h */ @@ -11,12 +11,18 @@ #include "lobject.h" -#define NUM_HASHSTR 31 -#define NUM_HASHUDATA 31 +#define NUM_HASHSTR 31 /* a prime not in array `dimensions' */ +#define NUM_HASHUDATA 31 /* idem */ #define NUM_HASHS (NUM_HASHSTR+NUM_HASHUDATA) -extern TaggedString luaS_EMPTY; +/* +** any taggedstring with mark>=FIXMARK is never collected. +** Marks>=RESERVEDMARK are used to identify reserved words. +*/ +#define FIXMARK 2 +#define RESERVEDMARK 3 + void luaS_init (void); TaggedString *luaS_createudata (void *udata, int tag); -- cgit v1.2.3-55-g6feb