summaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lstate.c b/lstate.c
index 281206bc..57aa292d 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.c,v 1.14 1999/10/04 17:51:04 roberto Exp $ 2** $Id: lstate.c,v 1.15 1999/10/14 17:53:35 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*/
@@ -10,6 +10,7 @@
10#include "lgc.h" 10#include "lgc.h"
11#include "llex.h" 11#include "llex.h"
12#include "lmem.h" 12#include "lmem.h"
13#include "lref.h"
13#include "lstate.h" 14#include "lstate.h"
14#include "lstring.h" 15#include "lstring.h"
15#include "ltm.h" 16#include "ltm.h"
@@ -41,13 +42,15 @@ void lua_open (void) {
41 L->IMtable = NULL; 42 L->IMtable = NULL;
42 L->refArray = NULL; 43 L->refArray = NULL;
43 L->refSize = 0; 44 L->refSize = 0;
44 L->GCthreshold = GARBAGE_BLOCK; 45 L->refFree = NONEXT;
45 L->nblocks = 0; 46 L->nblocks = 0;
47 L->GCthreshold = MAX_INT; /* to avoid GC during pre-definitions */
46 luaD_init(); 48 luaD_init();
47 luaS_init(); 49 luaS_init();
48 luaX_init(); 50 luaX_init();
49 luaT_init(); 51 luaT_init();
50 luaB_predefine(); 52 luaB_predefine();
53 L->GCthreshold = L->nblocks*4;
51} 54}
52 55
53 56
@@ -70,4 +73,3 @@ void lua_close (void) {
70 L = NULL; 73 L = NULL;
71} 74}
72 75
73