diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-06-19 11:27:00 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-06-19 11:27:00 -0300 |
commit | 130c0e40e01e24a79f7e416d1cc4187cd4a2a5fc (patch) | |
tree | 946ed95a3c70012ba57e0be4abdd4a5e7263fc44 /llex.c | |
parent | c72fb1cf8e0869aa4adc894c4e28f9d1be2e6574 (diff) | |
download | lua-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |