aboutsummaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-03-04 10:31:21 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-03-04 10:31:21 -0300
commita80cada9142f9e967c710e37934067a708224161 (patch)
treeb6ecc44201408c9e9cf520f47f15413531c51161 /lstate.c
parenta00013c8d0d268616e004715da499e88e03b534c (diff)
downloadlua-a80cada9142f9e967c710e37934067a708224161.tar.gz
lua-a80cada9142f9e967c710e37934067a708224161.tar.bz2
lua-a80cada9142f9e967c710e37934067a708224161.zip
new cache for interning strings
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/lstate.c b/lstate.c
index d42f0e82..3a9b8e98 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.c,v 2.126 2014/11/02 19:19:04 roberto Exp roberto $ 2** $Id: lstate.c,v 2.127 2014/11/02 19:33:33 roberto Exp roberto $
3** Global State 3** Global State
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -37,9 +37,6 @@
37#endif 37#endif
38 38
39 39
40#define MEMERRMSG "not enough memory"
41
42
43/* 40/*
44** a macro to help the creation of a unique random seed when a state is 41** a macro to help the creation of a unique random seed when a state is
45** created; the seed is used to randomize hashes. 42** created; the seed is used to randomize hashes.
@@ -200,12 +197,9 @@ static void f_luaopen (lua_State *L, void *ud) {
200 UNUSED(ud); 197 UNUSED(ud);
201 stack_init(L, L); /* init stack */ 198 stack_init(L, L); /* init stack */
202 init_registry(L, g); 199 init_registry(L, g);
203 luaS_resize(L, MINSTRTABSIZE); /* initial size of string table */ 200 luaS_init(L);
204 luaT_init(L); 201 luaT_init(L);
205 luaX_init(L); 202 luaX_init(L);
206 /* pre-create memory-error message */
207 g->memerrmsg = luaS_newliteral(L, MEMERRMSG);
208 luaC_fix(L, obj2gco(g->memerrmsg)); /* it should never be collected */
209 g->gcrunning = 1; /* allow gc */ 203 g->gcrunning = 1; /* allow gc */
210 g->version = lua_version(NULL); 204 g->version = lua_version(NULL);
211 luai_userstateopen(L); 205 luai_userstateopen(L);