aboutsummaryrefslogtreecommitdiff
path: root/lstring.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-10-11 14:13:42 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-10-11 14:13:42 -0200
commitc5fee7615e979e3a39af44614f82938519dedb68 (patch)
tree831ad8d88aba1d15e6337838d11e0234bd2e96d6 /lstring.h
parentcca78b5c71f4def3d3d80c71f690f8380b3cb35e (diff)
downloadlua-c5fee7615e979e3a39af44614f82938519dedb68.tar.gz
lua-c5fee7615e979e3a39af44614f82938519dedb68.tar.bz2
lua-c5fee7615e979e3a39af44614f82938519dedb68.zip
new implementation for string hashing, with chaining.
Diffstat (limited to 'lstring.h')
-rw-r--r--lstring.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/lstring.h b/lstring.h
index 7fc50810..c1323808 100644
--- a/lstring.h
+++ b/lstring.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstring.h,v 1.8 1999/08/16 20:52:00 roberto Exp roberto $ 2** $Id: lstring.h,v 1.9 1999/10/04 17:51:04 roberto Exp roberto $
3** String table (keep all strings handled by Lua) 3** String table (keep all strings handled by Lua)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -11,12 +11,18 @@
11#include "lobject.h" 11#include "lobject.h"
12 12
13 13
14#define NUM_HASHSTR 31 14#define NUM_HASHSTR 31 /* a prime not in array `dimensions' */
15#define NUM_HASHUDATA 31 15#define NUM_HASHUDATA 31 /* idem */
16#define NUM_HASHS (NUM_HASHSTR+NUM_HASHUDATA) 16#define NUM_HASHS (NUM_HASHSTR+NUM_HASHUDATA)
17 17
18 18
19extern TaggedString luaS_EMPTY; 19/*
20** any taggedstring with mark>=FIXMARK is never collected.
21** Marks>=RESERVEDMARK are used to identify reserved words.
22*/
23#define FIXMARK 2
24#define RESERVEDMARK 3
25
20 26
21void luaS_init (void); 27void luaS_init (void);
22TaggedString *luaS_createudata (void *udata, int tag); 28TaggedString *luaS_createudata (void *udata, int tag);