diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-05-03 12:51:16 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-05-03 12:51:16 -0300 |
| commit | bc1c718cc02d4a0163110cb21bcbdd2985e4d28d (patch) | |
| tree | 8b429f80e006b89b290cd9dcac45ee0951ba8aef | |
| parent | c9ce754e38712afc1de6325cfa1291324dbdda61 (diff) | |
| download | lua-bc1c718cc02d4a0163110cb21bcbdd2985e4d28d.tar.gz lua-bc1c718cc02d4a0163110cb21bcbdd2985e4d28d.tar.bz2 lua-bc1c718cc02d4a0163110cb21bcbdd2985e4d28d.zip | |
removed TOKEN_LEN (useless)
| -rw-r--r-- | llex.c | 3 | ||||
| -rw-r--r-- | llex.h | 4 |
2 files changed, 2 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: llex.c,v 2.45 2011/02/02 14:55:17 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 2.46 2011/02/23 13:13:10 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 | */ |
| @@ -67,7 +67,6 @@ void luaX_init (lua_State *L) { | |||
| 67 | for (i=0; i<NUM_RESERVED; i++) { | 67 | for (i=0; i<NUM_RESERVED; i++) { |
| 68 | TString *ts = luaS_new(L, luaX_tokens[i]); | 68 | TString *ts = luaS_new(L, luaX_tokens[i]); |
| 69 | luaS_fix(ts); /* reserved words are never collected */ | 69 | luaS_fix(ts); /* reserved words are never collected */ |
| 70 | lua_assert(strlen(luaX_tokens[i])+1 <= TOKEN_LEN); | ||
| 71 | ts->tsv.reserved = cast_byte(i+1); /* reserved word */ | 70 | ts->tsv.reserved = cast_byte(i+1); /* reserved word */ |
| 72 | } | 71 | } |
| 73 | } | 72 | } |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: llex.h,v 1.68 2011/02/07 17:14:50 roberto Exp roberto $ | 2 | ** $Id: llex.h,v 1.69 2011/02/23 13:13:10 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 | */ |
| @@ -13,8 +13,6 @@ | |||
| 13 | 13 | ||
| 14 | #define FIRST_RESERVED 257 | 14 | #define FIRST_RESERVED 257 |
| 15 | 15 | ||
| 16 | /* maximum length of a reserved word */ | ||
| 17 | #define TOKEN_LEN (sizeof("function")/sizeof(char)) | ||
| 18 | 16 | ||
| 19 | 17 | ||
| 20 | /* | 18 | /* |
