aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-05-03 12:51:16 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-05-03 12:51:16 -0300
commitbc1c718cc02d4a0163110cb21bcbdd2985e4d28d (patch)
tree8b429f80e006b89b290cd9dcac45ee0951ba8aef
parentc9ce754e38712afc1de6325cfa1291324dbdda61 (diff)
downloadlua-bc1c718cc02d4a0163110cb21bcbdd2985e4d28d.tar.gz
lua-bc1c718cc02d4a0163110cb21bcbdd2985e4d28d.tar.bz2
lua-bc1c718cc02d4a0163110cb21bcbdd2985e4d28d.zip
removed TOKEN_LEN (useless)
-rw-r--r--llex.c3
-rw-r--r--llex.h4
2 files changed, 2 insertions, 5 deletions
diff --git a/llex.c b/llex.c
index 4e0b7a58..51f22554 100644
--- a/llex.c
+++ b/llex.c
@@ -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}
diff --git a/llex.h b/llex.h
index 01a40317..8d2a4d80 100644
--- a/llex.h
+++ b/llex.h
@@ -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/*