summaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-12-21 16:04:41 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-12-21 16:04:41 -0200
commit6c79a0a80d517354dcc19a1ef64569fba9b19365 (patch)
tree3e5bd168c460c32dc198ef06fbae4c4b917e7341 /lstate.c
parent3daeabb60667adc8d4b9c570631704548099a7bf (diff)
downloadlua-6c79a0a80d517354dcc19a1ef64569fba9b19365.tar.gz
lua-6c79a0a80d517354dcc19a1ef64569fba9b19365.tar.bz2
lua-6c79a0a80d517354dcc19a1ef64569fba9b19365.zip
new way to control hooks inside hooks (now the control is done inside Lua)
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lstate.c b/lstate.c
index 37b6f2a3..e82ca950 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.c,v 1.21 1999/12/06 12:03:45 roberto Exp roberto $ 2** $Id: lstate.c,v 1.22 1999/12/07 11:42:54 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*/
@@ -38,9 +38,6 @@ static lua_State *newstate_aux (int stacksize, int put_builtin) {
38 L->Mbuffnext = 0; 38 L->Mbuffnext = 0;
39 L->Cblocks = NULL; 39 L->Cblocks = NULL;
40 L->numCblocks = 0; 40 L->numCblocks = 0;
41 L->debug = 0;
42 L->callhook = NULL;
43 L->linehook = NULL;
44 L->rootproto = NULL; 41 L->rootproto = NULL;
45 L->rootcl = NULL; 42 L->rootcl = NULL;
46 L->rootglobal = NULL; 43 L->rootglobal = NULL;
@@ -51,6 +48,10 @@ static lua_State *newstate_aux (int stacksize, int put_builtin) {
51 L->refFree = NONEXT; 48 L->refFree = NONEXT;
52 L->nblocks = 0; 49 L->nblocks = 0;
53 L->GCthreshold = MAX_INT; /* to avoid GC during pre-definitions */ 50 L->GCthreshold = MAX_INT; /* to avoid GC during pre-definitions */
51 L->debug = 0;
52 L->callhook = NULL;
53 L->linehook = NULL;
54 L->allowhooks = 1;
54 luaD_init(L, stacksize); 55 luaD_init(L, stacksize);
55 luaS_init(L); 56 luaS_init(L);
56 luaX_init(L); 57 luaX_init(L);