Branch: Tag:

2001-09-01

2001-09-01 01:45:52 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

mapping hash table sizes are now always primes

Rev: src/mapping.c:1.132
Rev: src/stuff.c:1.14
Rev: src/stuff.h:1.12
Rev: src/svalue.c:1.118

5:   \*/   /**/   #include "global.h" - RCSID("$Id: mapping.c,v 1.131 2001/08/22 14:10:59 grubba Exp $"); + RCSID("$Id: mapping.c,v 1.132 2001/09/01 01:45:51 hubbe Exp $");   #include "main.h"   #include "object.h"   #include "mapping.h"
164:   #endif    if(size)    { -  hashsize=size / AVG_LINK_LENGTH + 1; -  if(!(hashsize & 1)) hashsize++; +  hashsize=find_good_hash_size(size / AVG_LINK_LENGTH + 1);       e=MAPPING_DATA_SIZE(hashsize, size);