aboutsummaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-10-08 15:46:08 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-10-08 15:46:08 -0300
commitb3d0682fb94f56a438dbb4fdb2b3440ccc10cfb4 (patch)
tree746fc9900768dfaf1ddffca35cb4f6fd55903bbf /lstate.c
parent02afc892d5ce5d85e88faac443d7294589ee697a (diff)
downloadlua-b3d0682fb94f56a438dbb4fdb2b3440ccc10cfb4.tar.gz
lua-b3d0682fb94f56a438dbb4fdb2b3440ccc10cfb4.tar.bz2
lua-b3d0682fb94f56a438dbb4fdb2b3440ccc10cfb4.zip
use of different buffers for scanner and concatenation
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lstate.c b/lstate.c
index a2334cca..a8136d1a 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.c,v 1.104 2002/08/16 20:00:28 roberto Exp roberto $ 2** $Id: lstate.c,v 1.105 2002/08/30 19:09:21 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*/
@@ -61,8 +61,7 @@ static void f_luaopen (lua_State *L, void *ud) {
61 G(L)->strt.size = 0; 61 G(L)->strt.size = 0;
62 G(L)->strt.nuse = 0; 62 G(L)->strt.nuse = 0;
63 G(L)->strt.hash = NULL; 63 G(L)->strt.hash = NULL;
64 G(L)->Mbuffer = NULL; 64 luaZ_initbuffer(L, &G(L)->buff);
65 G(L)->Mbuffsize = 0;
66 G(L)->panic = &default_panic; 65 G(L)->panic = &default_panic;
67 G(L)->rootgc = NULL; 66 G(L)->rootgc = NULL;
68 G(L)->rootudata = NULL; 67 G(L)->rootudata = NULL;
@@ -160,7 +159,7 @@ static void close_state (lua_State *L) {
160 lua_assert(G(L)->rootgc == NULL); 159 lua_assert(G(L)->rootgc == NULL);
161 lua_assert(G(L)->rootudata == NULL); 160 lua_assert(G(L)->rootudata == NULL);
162 luaS_freeall(L); 161 luaS_freeall(L);
163 luaM_freearray(L, G(L)->Mbuffer, G(L)->Mbuffsize, char); 162 luaZ_freebuffer(L, &G(L)->buff);
164 luaM_freelem(NULL, L->l_G); 163 luaM_freelem(NULL, L->l_G);
165 } 164 }
166 luaE_closethread(NULL, L); 165 luaE_closethread(NULL, L);