corrected some places where an old object could end up in front

of a new one + minimal documentation about this problem
This commit is contained in:
Roberto Ierusalimschy
2010-05-10 15:23:45 -03:00
parent c006f085d9
commit 1c1a98e872
4 changed files with 15 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lstring.c,v 2.16 2009/12/16 16:42:58 roberto Exp roberto $
** $Id: lstring.c,v 2.17 2010/04/03 20:24:18 roberto Exp roberto $
** String table (keeps all strings handled by Lua)
** See Copyright Notice in lua.h
*/
@@ -37,6 +37,7 @@ void luaS_resize (lua_State *L, int newsize) {
unsigned int h = lmod(gco2ts(p)->hash, newsize); /* new position */
gch(p)->next = tb->hash[h]; /* chain it */
tb->hash[h] = p;
resetoldbit(p); /* see MOVE OLD rule */
p = next;
}
}