diff --git a/ldebug.c b/ldebug.c index c462768d..f0b71758 100644 --- a/ldebug.c +++ b/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 1.70 2001/02/23 20:30:52 roberto Exp roberto $ +** $Id: ldebug.c,v 1.71 2001/03/02 17:27:50 roberto Exp roberto $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -223,7 +223,7 @@ static void funcinfo (lua_State *L, lua_Debug *ar, StkId func) { } else infoLproto(ar, cl->f.l); - luaO_chunkid(ar->short_src, ar->source, sizeof(ar->short_src)); + luaO_chunkid(ar->short_src, ar->source, LUA_IDSIZE); if (ar->linedefined == 0) ar->what = l_s("main"); } diff --git a/llex.c b/llex.c index 58cb9fb5..ab722b54 100644 --- a/llex.c +++ b/llex.c @@ -1,5 +1,5 @@ /* -** $Id: llex.c,v 1.80 2001/02/23 17:17:25 roberto Exp roberto $ +** $Id: llex.c,v 1.81 2001/02/23 20:32:16 roberto Exp roberto $ ** Lexical Analyzer ** See Copyright Notice in lua.h */ @@ -58,7 +58,7 @@ void luaX_checklimit (LexState *ls, int val, int limit, const l_char *msg) { void luaX_syntaxerror (LexState *ls, const l_char *s, const l_char *token) { l_char buff[MAXSRC]; - luaO_chunkid(buff, getstr(ls->source), sizeof(buff)); + luaO_chunkid(buff, getstr(ls->source), MAXSRC); luaO_verror(ls->L, l_s("%.99s;\n last token read: `%.30s' at line %d in %.80s"), s, token, ls->linenumber, buff); diff --git a/llex.h b/llex.h index 28b86ddb..4a4370f7 100644 --- a/llex.h +++ b/llex.h @@ -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)) /*