mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
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.
This commit is contained in:
parent
97ef8e7bd4
commit
55ac40f859
19 changed files with 159 additions and 165 deletions
7
llex.c
7
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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue