diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-02-27 09:33:07 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-02-27 09:33:07 -0300 |
| commit | e1a424e8a35738bf56ecdad01155fb45b3001660 (patch) | |
| tree | 34c232ea0cb15e410a161ee0f65bd9bdb73838d7 /lcode.c | |
| parent | 59ce42dbd5a2dd2dd8bfbbf3e856742a535afc5b (diff) | |
| download | lua-e1a424e8a35738bf56ecdad01155fb45b3001660.tar.gz lua-e1a424e8a35738bf56ecdad01155fb45b3001660.tar.bz2 lua-e1a424e8a35738bf56ecdad01155fb45b3001660.zip | |
avoid the identifier `index' (clashes with BSD `index' function)
Diffstat (limited to 'lcode.c')
| -rw-r--r-- | lcode.c | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lcode.c,v 1.114 2002/12/04 17:38:31 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 1.115 2002/12/11 12:34:22 roberto Exp roberto $ |
| 3 | ** Code generator for Lua | 3 | ** Code generator for Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -207,10 +207,10 @@ static void freeexp (FuncState *fs, expdesc *e) { | |||
| 207 | 207 | ||
| 208 | 208 | ||
| 209 | static int addk (FuncState *fs, TObject *k, TObject *v) { | 209 | static int addk (FuncState *fs, TObject *k, TObject *v) { |
| 210 | const TObject *index = luaH_get(fs->h, k); | 210 | const TObject *idx = luaH_get(fs->h, k); |
| 211 | if (ttisnumber(index)) { | 211 | if (ttisnumber(idx)) { |
| 212 | lua_assert(luaO_rawequalObj(&fs->f->k[cast(int, nvalue(index))], v)); | 212 | lua_assert(luaO_rawequalObj(&fs->f->k[cast(int, nvalue(idx))], v)); |
| 213 | return cast(int, nvalue(index)); | 213 | return cast(int, nvalue(idx)); |
| 214 | } | 214 | } |
| 215 | else { /* constant not found; create a new entry */ | 215 | else { /* constant not found; create a new entry */ |
| 216 | Proto *f = fs->f; | 216 | Proto *f = fs->f; |
