summaryrefslogtreecommitdiff
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-github-b3d0682fb94f56a438dbb4fdb2b3440ccc10cfb4.tar.gz
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 @@
/*
-** $Id: lstate.c,v 1.104 2002/08/16 20:00:28 roberto Exp roberto $
+** $Id: lstate.c,v 1.105 2002/08/30 19:09:21 roberto Exp roberto $
** Global State
** See Copyright Notice in lua.h
*/
@@ -61,8 +61,7 @@ static void f_luaopen (lua_State *L, void *ud) {
G(L)->strt.size = 0;
G(L)->strt.nuse = 0;
G(L)->strt.hash = NULL;
- G(L)->Mbuffer = NULL;
- G(L)->Mbuffsize = 0;
+ luaZ_initbuffer(L, &G(L)->buff);
G(L)->panic = &default_panic;
G(L)->rootgc = NULL;
G(L)->rootudata = NULL;
@@ -160,7 +159,7 @@ static void close_state (lua_State *L) {
lua_assert(G(L)->rootgc == NULL);
lua_assert(G(L)->rootudata == NULL);
luaS_freeall(L);
- luaM_freearray(L, G(L)->Mbuffer, G(L)->Mbuffsize, char);
+ luaZ_freebuffer(L, &G(L)->buff);
luaM_freelem(NULL, L->l_G);
}
luaE_closethread(NULL, L);