This commit is contained in:
Roberto Ierusalimschy 2000-10-27 09:39:52 -02:00
parent 563b1f5704
commit e2b6b7de1b
2 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
/*
** $Id: ldebug.c,v 1.47 2000/10/09 13:47:32 roberto Exp roberto $
** $Id: ldebug.c,v 1.48 2000/10/20 16:39:03 roberto Exp roberto $
** Debug Interface
** See Copyright Notice in lua.h
*/
@ -169,7 +169,7 @@ LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar,
L->top--; /* pop new value */
if (!fp) return NULL; /* `f' is not a Lua function? */
name = luaF_getlocalname(fp, localnum, currentpc(f));
if (!name || name[0] == '*') return NULL; /* `*' starts private locals */
if (!name || name[0] == '(') return NULL; /* `(' starts private locals */
*((f+1)+(localnum-1)) = *L->top;
return name;
}

View File

@ -1,5 +1,5 @@
/*
** $Id: lparser.c,v 1.114 2000/09/29 12:42:13 roberto Exp roberto $
** $Id: lparser.c,v 1.115 2000/10/10 19:51:15 roberto Exp roberto $
** LL(1) Parser and code generator for Lua
** See Copyright Notice in lua.h
*/
@ -859,8 +859,8 @@ static void fornum (LexState *ls, TString *varname) {
else
luaK_code1(fs, OP_PUSHINT, 1); /* default step */
new_localvar(ls, varname, 0);
new_localvarstr(ls, "*limit*", 1);
new_localvarstr(ls, "*step*", 2);
new_localvarstr(ls, "(limit)", 1);
new_localvarstr(ls, "(step)", 2);
forbody(ls, 3, OP_FORPREP, OP_FORLOOP);
}
@ -876,7 +876,7 @@ static void forlist (LexState *ls, TString *indexname) {
"`in' expected");
next(ls); /* skip `in' */
exp1(ls); /* table */
new_localvarstr(ls, "*table*", 0);
new_localvarstr(ls, "(table)", 0);
new_localvar(ls, indexname, 1);
new_localvar(ls, valname, 2);
forbody(ls, 3, OP_LFORPREP, OP_LFORLOOP);