diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-01-05 16:20:51 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-01-05 16:20:51 -0200 |
commit | e2498e079e4636217e89f0b28844c4b5df4f8793 (patch) | |
tree | da82e007f0e8153985323c2bdb190811f79e0c57 /lparser.c | |
parent | 65726f3e2e226f6a350a5dba643c13c8edd34965 (diff) | |
download | lua-e2498e079e4636217e89f0b28844c4b5df4f8793.tar.gz lua-e2498e079e4636217e89f0b28844c4b5df4f8793.tar.bz2 lua-e2498e079e4636217e89f0b28844c4b5df4f8793.zip |
change in hash algorithm so that it does not need empty slot
(tables can be 100% full)
Diffstat (limited to 'lparser.c')
-rw-r--r-- | lparser.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 2.11 2004/12/07 18:31:16 roberto Exp $ | 2 | ** $Id: lparser.c,v 2.12 2005/01/04 15:55:12 roberto Exp roberto $ |
3 | ** Lua Parser | 3 | ** Lua Parser |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -547,7 +547,7 @@ static void constructor (LexState *ls, expdesc *t) { | |||
547 | check_match(ls, '}', '{', line); | 547 | check_match(ls, '}', '{', line); |
548 | lastlistfield(fs, &cc); | 548 | lastlistfield(fs, &cc); |
549 | SETARG_B(fs->f->code[pc], luaO_int2fb(cc.na)); /* set initial array size */ | 549 | SETARG_B(fs->f->code[pc], luaO_int2fb(cc.na)); /* set initial array size */ |
550 | SETARG_C(fs->f->code[pc], luaO_int2fb(cc.nh+1)); /* set initial table size */ | 550 | SETARG_C(fs->f->code[pc], luaO_int2fb(cc.nh)); /* set initial table size */ |
551 | } | 551 | } |
552 | 552 | ||
553 | /* }====================================================================== */ | 553 | /* }====================================================================== */ |