diff options
author | Lua Team <team@lua.org> | 1999-07-08 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 1999-07-08 12:00:00 +0000 |
commit | afb67002d94ef22c14741910ba83da262a6e9338 (patch) | |
tree | b51ab3502813f590a4b115997f6fe41da43b6586 /src/lstate.c | |
parent | 377347776f1f3d820f92151f70bec667f96d5e6b (diff) | |
download | lua-github-3.2.tar.gz |
Lua 3.23.2
Diffstat (limited to 'src/lstate.c')
-rw-r--r-- | src/lstate.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lstate.c b/src/lstate.c index 43015b97..3b98d729 100644 --- a/src/lstate.c +++ b/src/lstate.c @@ -1,5 +1,5 @@ /* -** $Id: lstate.c,v 1.6 1998/06/02 20:37:04 roberto Exp $ +** $Id: lstate.c,v 1.12 1999/05/11 20:08:20 roberto Exp $ ** Global State ** See Copyright Notice in lua.h */ @@ -24,11 +24,19 @@ void lua_open (void) { if (lua_state) return; lua_state = luaM_new(lua_State); - L->numCblocks = 0; L->Cstack.base = 0; L->Cstack.lua2C = 0; L->Cstack.num = 0; L->errorJmp = NULL; + L->Mbuffer = NULL; + L->Mbuffbase = 0; + L->Mbuffsize = 0; + L->Mbuffnext = 0; + L->Cblocks = NULL; + L->numCblocks = 0; + L->debug = 0; + L->callhook = NULL; + L->linehook = NULL; L->rootproto.next = NULL; L->rootproto.marked = 0; L->rootcl.next = NULL; @@ -37,12 +45,9 @@ void lua_open (void) L->rootglobal.marked = 0; L->roottable.next = NULL; L->roottable.marked = 0; + L->IMtable = NULL; L->refArray = NULL; L->refSize = 0; - L->Mbuffsize = 0; - L->Mbuffnext = 0; - L->Mbuffbase = NULL; - L->Mbuffer = NULL; L->GCthreshold = GARBAGE_BLOCK; L->nblocks = 0; luaD_init(); @@ -69,6 +74,7 @@ void lua_close (void) luaM_free(L->IMtable); luaM_free(L->refArray); luaM_free(L->Mbuffer); + luaM_free(L->Cblocks); luaM_free(L); L = NULL; #ifdef DEBUG @@ -78,9 +84,3 @@ void lua_close (void) } -lua_State *lua_setstate (lua_State *st) { - lua_State *old = lua_state; - lua_state = st; - return old; -} - |