new cache for interning strings

This commit is contained in:
Roberto Ierusalimschy
2015-03-04 10:31:21 -03:00
parent a00013c8d0
commit a80cada914
6 changed files with 61 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lstate.h,v 2.118 2014/10/25 11:50:46 roberto Exp roberto $
** $Id: lstate.h,v 2.119 2014/10/30 18:53:28 roberto Exp roberto $
** Global State
** See Copyright Notice in lua.h
*/
@@ -140,6 +140,7 @@ typedef struct global_State {
TString *memerrmsg; /* memory-error message */
TString *tmname[TM_N]; /* array with tag-method names */
struct Table *mt[LUA_NUMTAGS]; /* metatables for basic types */
TString *strcache[STRCACHE_SIZE]; /* cache for strings in API */
} global_State;