diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-05-10 13:33:20 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-05-10 13:33:20 -0300 |
commit | 330e51bed3159aa83dcc9cc559c22e7d84d37604 (patch) | |
tree | 8d11540f124fe432e12296c85091947161fb3886 /lparser.c | |
parent | 44b71ca81696dbec561c0172d1b81533f1c2153e (diff) | |
download | lua-330e51bed3159aa83dcc9cc559c22e7d84d37604.tar.gz lua-330e51bed3159aa83dcc9cc559c22e7d84d37604.tar.bz2 lua-330e51bed3159aa83dcc9cc559c22e7d84d37604.zip |
string hash uses one single hash table
Diffstat (limited to 'lparser.c')
-rw-r--r-- | lparser.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 1.83 2000/04/27 17:39:56 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 1.84 2000/05/08 18:46:34 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 | */ |
@@ -139,13 +139,13 @@ static void check_END (LexState *ls, int who, int where) { | |||
139 | 139 | ||
140 | static int string_constant (FuncState *fs, TString *s) { | 140 | static int string_constant (FuncState *fs, TString *s) { |
141 | Proto *f = fs->f; | 141 | Proto *f = fs->f; |
142 | int c = s->constindex; | 142 | int c = s->u.s.constindex; |
143 | if (c >= f->nkstr || f->kstr[c] != s) { | 143 | if (c >= f->nkstr || f->kstr[c] != s) { |
144 | luaM_growvector(fs->L, f->kstr, f->nkstr, 1, TString *, | 144 | luaM_growvector(fs->L, f->kstr, f->nkstr, 1, TString *, |
145 | constantEM, MAXARG_U); | 145 | constantEM, MAXARG_U); |
146 | c = f->nkstr++; | 146 | c = f->nkstr++; |
147 | f->kstr[c] = s; | 147 | f->kstr[c] = s; |
148 | s->constindex = c; /* hint for next time */ | 148 | s->u.s.constindex = c; /* hint for next time */ |
149 | } | 149 | } |
150 | return c; | 150 | return c; |
151 | } | 151 | } |