From 55ac40f859ad8e28fe71a8801d49f4a4140e8aa3 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 20 Jun 2024 13:43:33 -0300 Subject: Cleaning of llimits.h Several definitions that don't need to be "global" (that is, that concerns only specific parts of the code) moved out of llimits.h, to more appropriate places. --- llex.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'llex.c') diff --git a/llex.c b/llex.c index 9f20d3c8..3446f4e0 100644 --- a/llex.c +++ b/llex.c @@ -32,6 +32,11 @@ #define next(ls) (ls->current = zgetc(ls->z)) +/* minimum size for string buffer */ +#if !defined(LUA_MINBUFFER) +#define LUA_MINBUFFER 32 +#endif + #define currIsNewline(ls) (ls->current == '\n' || ls->current == '\r') @@ -159,7 +164,7 @@ static void inclinenumber (LexState *ls) { next(ls); /* skip '\n' or '\r' */ if (currIsNewline(ls) && ls->current != old) next(ls); /* skip '\n\r' or '\r\n' */ - if (++ls->linenumber >= MAX_INT) + if (++ls->linenumber >= INT_MAX) lexerror(ls, "chunk has too many lines", 0); } -- cgit v1.2.3-55-g6feb