aboutsummaryrefslogtreecommitdiff
path: root/lstring.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-05-10 13:33:20 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-05-10 13:33:20 -0300
commit330e51bed3159aa83dcc9cc559c22e7d84d37604 (patch)
tree8d11540f124fe432e12296c85091947161fb3886 /lstring.h
parent44b71ca81696dbec561c0172d1b81533f1c2153e (diff)
downloadlua-330e51bed3159aa83dcc9cc559c22e7d84d37604.tar.gz
lua-330e51bed3159aa83dcc9cc559c22e7d84d37604.tar.bz2
lua-330e51bed3159aa83dcc9cc559c22e7d84d37604.zip
string hash uses one single hash table
Diffstat (limited to 'lstring.h')
-rw-r--r--lstring.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/lstring.h b/lstring.h
index 8e307292..5d6ff49f 100644
--- a/lstring.h
+++ b/lstring.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstring.h,v 1.18 2000/03/10 18:37:44 roberto Exp roberto $ 2** $Id: lstring.h,v 1.19 2000/05/08 19:32:53 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*/
@@ -12,11 +12,6 @@
12#include "lstate.h" 12#include "lstate.h"
13 13
14 14
15#define NUM_HASHSTR 32
16#define NUM_HASHUDATA 31
17#define NUM_HASHS (NUM_HASHSTR+NUM_HASHUDATA)
18
19
20/* 15/*
21** any TString with mark>=FIXMARK is never collected. 16** any TString with mark>=FIXMARK is never collected.
22** Marks>=RESERVEDMARK are used to identify reserved words. 17** Marks>=RESERVEDMARK are used to identify reserved words.
@@ -25,11 +20,14 @@
25#define RESERVEDMARK 3 20#define RESERVEDMARK 3
26 21
27 22
23#define gcsizestring(L, l) numblocks(L, 0, sizeof(TString)+l)
24#define gcsizeudata gcsizestring(L, 0)
25
26
28void luaS_init (lua_State *L); 27void luaS_init (lua_State *L);
29void luaS_resize (lua_State *L, stringtable *tb, int newsize); 28void luaS_resize (lua_State *L, stringtable *tb, int newsize);
30TString *luaS_createudata (lua_State *L, void *udata, int tag); 29TString *luaS_createudata (lua_State *L, void *udata, int tag);
31void luaS_freeall (lua_State *L); 30void luaS_freeall (lua_State *L);
32void luaS_free (lua_State *L, TString *ts);
33TString *luaS_newlstr (lua_State *L, const char *str, long l); 31TString *luaS_newlstr (lua_State *L, const char *str, long l);
34TString *luaS_new (lua_State *L, const char *str); 32TString *luaS_new (lua_State *L, const char *str);
35TString *luaS_newfixed (lua_State *L, const char *str); 33TString *luaS_newfixed (lua_State *L, const char *str);