string hash uses one single hash table

This commit is contained in:
Roberto Ierusalimschy
2000-05-10 13:33:20 -03:00
parent 44b71ca816
commit 330e51bed3
7 changed files with 90 additions and 131 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lstate.h,v 1.31 2000/03/30 17:19:48 roberto Exp roberto $
** $Id: lstate.h,v 1.32 2000/05/08 19:32:53 roberto Exp roberto $
** Global State
** See Copyright Notice in lua.h
*/
@@ -42,7 +42,7 @@ struct C_Lua_Stack {
typedef struct stringtable {
int size;
int nuse; /* number of elements */
long nuse; /* number of elements */
TString **hash;
} stringtable;
@@ -66,7 +66,8 @@ struct lua_State {
Proto *rootproto; /* list of all prototypes */
Closure *rootcl; /* list of all closures */
Hash *roottable; /* list of all tables */
stringtable *string_root; /* array of hash tables for strings and udata */
stringtable strt; /* hash table for strings */
stringtable udt; /* hash table for udata */
Hash *gt; /* table for globals */
struct IM *IMtable; /* table for tag methods */
int last_tag; /* last used tag in IMtable */
@@ -82,8 +83,5 @@ struct lua_State {
};
#endif