commit bc1c718cc02d4a0163110cb21bcbdd2985e4d28d
parent c9ce754e38712afc1de6325cfa1291324dbdda61
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Tue, 3 May 2011 12:50:52 -0300
removed TOKEN_LEN (useless)
Diffstat:
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/llex.c b/llex.c
@@ -1,5 +1,5 @@
/*
-** $Id: llex.c,v 2.45 2011/02/02 14:55:17 roberto Exp roberto $
+** $Id: llex.c,v 2.46 2011/02/23 13:13:10 roberto Exp roberto $
** Lexical Analyzer
** See Copyright Notice in lua.h
*/
@@ -67,7 +67,6 @@ void luaX_init (lua_State *L) {
for (i=0; i<NUM_RESERVED; i++) {
TString *ts = luaS_new(L, luaX_tokens[i]);
luaS_fix(ts); /* reserved words are never collected */
- lua_assert(strlen(luaX_tokens[i])+1 <= TOKEN_LEN);
ts->tsv.reserved = cast_byte(i+1); /* reserved word */
}
}
diff --git a/llex.h b/llex.h
@@ -1,5 +1,5 @@
/*
-** $Id: llex.h,v 1.68 2011/02/07 17:14:50 roberto Exp roberto $
+** $Id: llex.h,v 1.69 2011/02/23 13:13:10 roberto Exp roberto $
** Lexical Analyzer
** See Copyright Notice in lua.h
*/
@@ -13,8 +13,6 @@
#define FIRST_RESERVED 257
-/* maximum length of a reserved word */
-#define TOKEN_LEN (sizeof("function")/sizeof(char))
/*