aboutsummaryrefslogtreecommitdiff
path: root/lbuffer.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-03-03 11:58:26 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-03-03 11:58:26 -0300
commit3c9d999424520c809e05bee11d81788b488434f6 (patch)
tree7556d9ea10bda42b226aec4dd956753467cc0864 /lbuffer.c
parentf7840a3e0bc07813246b2bad6bf4579848187908 (diff)
downloadlua-3c9d999424520c809e05bee11d81788b488434f6.tar.gz
lua-3c9d999424520c809e05bee11d81788b488434f6.tar.bz2
lua-3c9d999424520c809e05bee11d81788b488434f6.zip
many details (most by lhf).
Diffstat (limited to 'lbuffer.c')
-rw-r--r--lbuffer.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lbuffer.c b/lbuffer.c
index 2525ea02..f584936d 100644
--- a/lbuffer.c
+++ b/lbuffer.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbuffer.c,v 1.10 1999/11/10 15:40:46 roberto Exp roberto $ 2** $Id: lbuffer.c,v 1.11 1999/11/22 13:12:07 roberto Exp roberto $
3** Auxiliary functions for building Lua libraries 3** Auxiliary functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -19,10 +19,14 @@
19-------------------------------------------------------*/ 19-------------------------------------------------------*/
20 20
21 21
22/*
23** amount of extra space (pre)allocated when buffer is reallocated
24*/
22#define EXTRABUFF 32 25#define EXTRABUFF 32
23 26
24 27
25#define openspace(L, size) if (L->Mbuffnext+(size) > L->Mbuffsize) Openspace(L, size) 28#define openspace(L, size) if (L->Mbuffnext+(size) > L->Mbuffsize) \
29 Openspace(L, size)
26 30
27static void Openspace (lua_State *L, int size) { 31static void Openspace (lua_State *L, int size) {
28 L->Mbuffsize = (L->Mbuffnext+size+EXTRABUFF)*2; 32 L->Mbuffsize = (L->Mbuffnext+size+EXTRABUFF)*2;