sizeof(string) != strlen(string)+1 when sizeof(char) != 1

This commit is contained in:
Roberto Ierusalimschy
2001-03-06 11:46:54 -03:00
parent 9e8a46daa2
commit e9a3820370
3 changed files with 6 additions and 6 deletions

4
llex.h
View File

@@ -1,5 +1,5 @@
/*
** $Id: llex.h,v 1.33 2001/01/10 16:40:56 roberto Exp roberto $
** $Id: llex.h,v 1.34 2001/02/23 17:17:25 roberto Exp roberto $
** Lexical Analyzer
** See Copyright Notice in lua.h
*/
@@ -14,7 +14,7 @@
#define FIRST_RESERVED 257
/* maximum length of a reserved word */
#define TOKEN_LEN (sizeof(l_s("function")))
#define TOKEN_LEN (sizeof(l_s("function"))/sizeof(l_char))
/*