diff options
| -rw-r--r-- | ldebug.c | 4 | ||||
| -rw-r--r-- | lparser.c | 8 |
2 files changed, 6 insertions, 6 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldebug.c,v 1.47 2000/10/09 13:47:32 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 1.48 2000/10/20 16:39:03 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 | */ |
| @@ -169,7 +169,7 @@ LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, | |||
| 169 | L->top--; /* pop new value */ | 169 | L->top--; /* pop new value */ |
| 170 | if (!fp) return NULL; /* `f' is not a Lua function? */ | 170 | if (!fp) return NULL; /* `f' is not a Lua function? */ |
| 171 | name = luaF_getlocalname(fp, localnum, currentpc(f)); | 171 | name = luaF_getlocalname(fp, localnum, currentpc(f)); |
| 172 | if (!name || name[0] == '*') return NULL; /* `*' starts private locals */ | 172 | if (!name || name[0] == '(') return NULL; /* `(' starts private locals */ |
| 173 | *((f+1)+(localnum-1)) = *L->top; | 173 | *((f+1)+(localnum-1)) = *L->top; |
| 174 | return name; | 174 | return name; |
| 175 | } | 175 | } |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lparser.c,v 1.114 2000/09/29 12:42:13 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 1.115 2000/10/10 19:51:15 roberto Exp roberto $ |
| 3 | ** LL(1) Parser and code generator for Lua | 3 | ** LL(1) Parser and code generator for Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -859,8 +859,8 @@ static void fornum (LexState *ls, TString *varname) { | |||
| 859 | else | 859 | else |
| 860 | luaK_code1(fs, OP_PUSHINT, 1); /* default step */ | 860 | luaK_code1(fs, OP_PUSHINT, 1); /* default step */ |
| 861 | new_localvar(ls, varname, 0); | 861 | new_localvar(ls, varname, 0); |
| 862 | new_localvarstr(ls, "*limit*", 1); | 862 | new_localvarstr(ls, "(limit)", 1); |
| 863 | new_localvarstr(ls, "*step*", 2); | 863 | new_localvarstr(ls, "(step)", 2); |
| 864 | forbody(ls, 3, OP_FORPREP, OP_FORLOOP); | 864 | forbody(ls, 3, OP_FORPREP, OP_FORLOOP); |
| 865 | } | 865 | } |
| 866 | 866 | ||
| @@ -876,7 +876,7 @@ static void forlist (LexState *ls, TString *indexname) { | |||
| 876 | "`in' expected"); | 876 | "`in' expected"); |
| 877 | next(ls); /* skip `in' */ | 877 | next(ls); /* skip `in' */ |
| 878 | exp1(ls); /* table */ | 878 | exp1(ls); /* table */ |
| 879 | new_localvarstr(ls, "*table*", 0); | 879 | new_localvarstr(ls, "(table)", 0); |
| 880 | new_localvar(ls, indexname, 1); | 880 | new_localvar(ls, indexname, 1); |
| 881 | new_localvar(ls, valname, 2); | 881 | new_localvar(ls, valname, 2); |
| 882 | forbody(ls, 3, OP_LFORPREP, OP_LFORLOOP); | 882 | forbody(ls, 3, OP_LFORPREP, OP_LFORLOOP); |
