diff options
Diffstat (limited to 'lcode.c')
-rw-r--r-- | lcode.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lcode.c,v 1.74 2001/06/11 14:56:42 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 1.75 2001/06/12 14:36:48 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 | */ |
@@ -232,12 +232,12 @@ static int addk (FuncState *fs, TObject *k) { | |||
232 | 232 | ||
233 | int luaK_stringk (FuncState *fs, TString *s) { | 233 | int luaK_stringk (FuncState *fs, TString *s) { |
234 | Proto *f = fs->f; | 234 | Proto *f = fs->f; |
235 | int c = s->constindex; | 235 | int c = s->tsv.constindex; |
236 | if (c >= fs->nk || ttype(&f->k[c]) != LUA_TSTRING || tsvalue(&f->k[c]) != s) { | 236 | if (c >= fs->nk || ttype(&f->k[c]) != LUA_TSTRING || tsvalue(&f->k[c]) != s) { |
237 | TObject o; | 237 | TObject o; |
238 | setsvalue(&o, s); | 238 | setsvalue(&o, s); |
239 | c = addk(fs, &o); | 239 | c = addk(fs, &o); |
240 | s->constindex = (unsigned short)c; /* hint for next time */ | 240 | s->tsv.constindex = (unsigned short)c; /* hint for next time */ |
241 | } | 241 | } |
242 | return c; | 242 | return c; |
243 | } | 243 | } |