summaryrefslogtreecommitdiff
path: root/src/hash-table.cc
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2002-11-05 12:28:40 +0000
committerBruno Haible <bruno@clisp.org>2002-11-05 12:28:40 +0000
commit5de859e40230f447d73e4f37870dc764a7569588 (patch)
tree9378e7f4c03ffe5aa4359b4ac831d7ab5f37f20e /src/hash-table.cc
parent8797dd362b7ca7fe57e9716120f80943b758710a (diff)
downloadgperf-5de859e40230f447d73e4f37870dc764a7569588.tar.gz
Replace class List_Node with class KeywordExt.
Diffstat (limited to 'src/hash-table.cc')
-rw-r--r--src/hash-table.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hash-table.cc b/src/hash-table.cc
index c37d666..c058b51 100644
--- a/src/hash-table.cc
+++ b/src/hash-table.cc
@@ -34,7 +34,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
This compromises information hiding somewhat, but greatly reduces
memory fragmentation, since we can now use alloca! */
-Hash_Table::Hash_Table (List_Node **table_ptr, int s, int ignore_len):
+Hash_Table::Hash_Table (KeywordExt **table_ptr, int s, int ignore_len):
table (table_ptr), size (s), collisions (0), ignore_length (ignore_len)
{
memset ((char *) table, 0, size * sizeof (*table));
@@ -68,8 +68,8 @@ Hash_Table::~Hash_Table (void)
in the table. Otherwise inserts the ITEM, and returns FALSE.
Uses double hashing. */
-List_Node *
-Hash_Table::insert (List_Node *item)
+KeywordExt *
+Hash_Table::insert (KeywordExt *item)
{
unsigned hash_val = hashpjw (item->selchars, item->selchars_length);
int probe = hash_val & (size - 1);
@@ -87,5 +87,5 @@ Hash_Table::insert (List_Node *item)
}
table[probe] = item;
- return (List_Node *) 0;
+ return NULL;
}