diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-02-22 14:15:18 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-02-22 14:15:18 -0300 |
commit | 52ee91dd73199e068d31d3ac138d933ddd4fb9b1 (patch) | |
tree | 9f9f1fdc16c8a3464fef14b9946482df688c2ea8 /llex.c | |
parent | 191fd35f0a6cd47ea03417a663395acf5d0e9bf5 (diff) | |
download | lua-52ee91dd73199e068d31d3ac138d933ddd4fb9b1.tar.gz lua-52ee91dd73199e068d31d3ac138d933ddd4fb9b1.tar.bz2 lua-52ee91dd73199e068d31d3ac138d933ddd4fb9b1.zip |
better encapsulation of some types
Diffstat (limited to 'llex.c')
-rw-r--r-- | llex.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.c,v 1.76 2001/01/19 13:20:30 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 1.77 2001/02/09 20:22:29 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 | */ |
@@ -36,7 +36,7 @@ void luaX_init (lua_State *L) { | |||
36 | for (i=0; i<NUM_RESERVED; i++) { | 36 | for (i=0; i<NUM_RESERVED; i++) { |
37 | TString *ts = luaS_new(L, token2string[i]); | 37 | TString *ts = luaS_new(L, token2string[i]); |
38 | lua_assert(strlen(token2string[i])+1 <= TOKEN_LEN); | 38 | lua_assert(strlen(token2string[i])+1 <= TOKEN_LEN); |
39 | ts->marked = (unsigned char)(RESERVEDMARK+i); /* reserved word */ | 39 | ts->marked = RESERVEDMARK+i; /* reserved word */ |
40 | } | 40 | } |
41 | } | 41 | } |
42 | 42 | ||
@@ -255,7 +255,7 @@ static void read_string (LexState *LS, int del, SemInfo *seminfo) { | |||
255 | c = 10*c + (LS->current-'0'); | 255 | c = 10*c + (LS->current-'0'); |
256 | next(LS); | 256 | next(LS); |
257 | } while (++i<3 && isdigit(LS->current)); | 257 | } while (++i<3 && isdigit(LS->current)); |
258 | if (c != (unsigned char)c) { | 258 | if (c > UCHAR_MAX) { |
259 | save(L, '\0', l); | 259 | save(L, '\0', l); |
260 | luaX_error(LS, "escape sequence too large", TK_STRING); | 260 | luaX_error(LS, "escape sequence too large", TK_STRING); |
261 | } | 261 | } |