diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-03-06 11:46:54 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-03-06 11:46:54 -0300 |
commit | e9a38203700865d36c3b2861200674a21930c1b5 (patch) | |
tree | f538c91f7d3faa8221906ff8b93b24d419ebd8e7 | |
parent | 9e8a46daa28e902b4a6d74134d96e80411789175 (diff) | |
download | lua-e9a38203700865d36c3b2861200674a21930c1b5.tar.gz lua-e9a38203700865d36c3b2861200674a21930c1b5.tar.bz2 lua-e9a38203700865d36c3b2861200674a21930c1b5.zip |
sizeof(string) != strlen(string)+1 when sizeof(char) != 1
-rw-r--r-- | ldebug.c | 4 | ||||
-rw-r--r-- | llex.c | 4 | ||||
-rw-r--r-- | llex.h | 4 |
3 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.c,v 1.70 2001/02/23 20:30:52 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 1.71 2001/03/02 17:27:50 roberto Exp roberto $ |
3 | ** Debug Interface | 3 | ** Debug Interface |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -223,7 +223,7 @@ static void funcinfo (lua_State *L, lua_Debug *ar, StkId func) { | |||
223 | } | 223 | } |
224 | else | 224 | else |
225 | infoLproto(ar, cl->f.l); | 225 | infoLproto(ar, cl->f.l); |
226 | luaO_chunkid(ar->short_src, ar->source, sizeof(ar->short_src)); | 226 | luaO_chunkid(ar->short_src, ar->source, LUA_IDSIZE); |
227 | if (ar->linedefined == 0) | 227 | if (ar->linedefined == 0) |
228 | ar->what = l_s("main"); | 228 | ar->what = l_s("main"); |
229 | } | 229 | } |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.c,v 1.80 2001/02/23 17:17:25 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 1.81 2001/02/23 20:32:16 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 | */ |
@@ -58,7 +58,7 @@ void luaX_checklimit (LexState *ls, int val, int limit, const l_char *msg) { | |||
58 | 58 | ||
59 | void luaX_syntaxerror (LexState *ls, const l_char *s, const l_char *token) { | 59 | void luaX_syntaxerror (LexState *ls, const l_char *s, const l_char *token) { |
60 | l_char buff[MAXSRC]; | 60 | l_char buff[MAXSRC]; |
61 | luaO_chunkid(buff, getstr(ls->source), sizeof(buff)); | 61 | luaO_chunkid(buff, getstr(ls->source), MAXSRC); |
62 | luaO_verror(ls->L, | 62 | luaO_verror(ls->L, |
63 | l_s("%.99s;\n last token read: `%.30s' at line %d in %.80s"), | 63 | l_s("%.99s;\n last token read: `%.30s' at line %d in %.80s"), |
64 | s, token, ls->linenumber, buff); | 64 | s, token, ls->linenumber, buff); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.h,v 1.33 2001/01/10 16:40:56 roberto Exp roberto $ | 2 | ** $Id: llex.h,v 1.34 2001/02/23 17:17:25 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 | */ |
@@ -14,7 +14,7 @@ | |||
14 | #define FIRST_RESERVED 257 | 14 | #define FIRST_RESERVED 257 |
15 | 15 | ||
16 | /* maximum length of a reserved word */ | 16 | /* maximum length of a reserved word */ |
17 | #define TOKEN_LEN (sizeof(l_s("function"))) | 17 | #define TOKEN_LEN (sizeof(l_s("function"))/sizeof(l_char)) |
18 | 18 | ||
19 | 19 | ||
20 | /* | 20 | /* |