1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 13:09:22 +00:00

Rework the hash table code.

This commit is contained in:
Bruno Haible
2002-12-19 12:35:17 +00:00
parent 388a431c7d
commit 1186e616cb
4 changed files with 163 additions and 77 deletions

View File

@@ -1,3 +1,22 @@
2002-11-03 Bruno Haible <bruno@clisp.org>
Bug fix: The hash table could fail to detect duplicates, between
keywords of different length, when option -n (option[NOLENGTH]) was
given.
* src/hash-table.h (Hash_Table::Hash_Table): Pass table size, not
vector and vector size as arguments.
(Hash_Table::_log_size): New field.
(Hash_Table::equal): New declaration.
* src/hash-table.cc (size_factor): New variable.
(Hash_Table::Hash_Table): Pass table size, not vector and vector size
as arguments. Allocate the vector here.
(Hash_Table::~Hash_Table): Deallocate the vector here.
(Hash_Table::equal): New function.
(Hash_Table::insert): Use it. Don't use item->_allchars_length for the
increment if _ignore_length is true.
* src/search.cc (TABLE_MULTIPLE): Remove variable.
(Search::prepare): Update.
2002-11-02 Bruno Haible <bruno@clisp.org>
Provide documentation also in PDF format.