summaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-06-19 11:27:00 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-06-19 11:27:00 -0300
commit130c0e40e01e24a79f7e416d1cc4187cd4a2a5fc (patch)
tree946ed95a3c70012ba57e0be4abdd4a5e7263fc44 /llex.c
parentc72fb1cf8e0869aa4adc894c4e28f9d1be2e6574 (diff)
downloadlua-130c0e40e01e24a79f7e416d1cc4187cd4a2a5fc.tar.gz
lua-130c0e40e01e24a79f7e416d1cc4187cd4a2a5fc.tar.bz2
lua-130c0e40e01e24a79f7e416d1cc4187cd4a2a5fc.zip
new constant 'MAX_SIZE', distinct from 'MAX_SIZET', for sizes visible
from Lua; these must fit in a lua_Integer
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/llex.c b/llex.c
index b14c0257..920922eb 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 2.65 2013/04/26 13:07:53 roberto Exp roberto $ 2** $Id: llex.c,v 2.66 2013/05/14 15:59:04 roberto Exp roberto $
3** Lexical Analyzer 3** Lexical Analyzer
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -53,7 +53,7 @@ static void save (LexState *ls, int c) {
53 Mbuffer *b = ls->buff; 53 Mbuffer *b = ls->buff;
54 if (luaZ_bufflen(b) + 1 > luaZ_sizebuffer(b)) { 54 if (luaZ_bufflen(b) + 1 > luaZ_sizebuffer(b)) {
55 size_t newsize; 55 size_t newsize;
56 if (luaZ_sizebuffer(b) >= MAX_SIZET/2) 56 if (luaZ_sizebuffer(b) >= MAX_SIZE/2)
57 lexerror(ls, "lexical element too long", 0); 57 lexerror(ls, "lexical element too long", 0);
58 newsize = luaZ_sizebuffer(b) * 2; 58 newsize = luaZ_sizebuffer(b) * 2;
59 luaZ_resizebuffer(ls->L, b, newsize); 59 luaZ_resizebuffer(ls->L, b, newsize);