summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2000-08-22 00:10:38 +0000
committerwtc%netscape.com <devnull@localhost>2000-08-22 00:10:38 +0000
commit4be6ffc6da5fea82ec745a31f3b2a0925e3ff3f1 (patch)
treee418348b22c673243b6648a3bea485c5954a5877
parentb1e73006f35355f11aeefd42aea10092f29112fb (diff)
downloadnspr-hg-4be6ffc6da5fea82ec745a31f3b2a0925e3ff3f1.tar.gz
Do not use the 'const' qualifier with PL_HashTableLookupConst() and
PL_HashTableRawLookupConst() because when compiled with HASHMETER defined they increment some counters in the hash table. r=larryh@netscape.com. (NSPRPUB_CLIENT_BRANCH)
-rw-r--r--lib/ds/plhash.c8
-rw-r--r--lib/ds/plhash.h6
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/ds/plhash.c b/lib/ds/plhash.c
index 1adaac35..9f8ff52a 100644
--- a/lib/ds/plhash.c
+++ b/lib/ds/plhash.c
@@ -198,11 +198,11 @@ PL_HashTableRawLookup(PLHashTable *ht, PLHashNumber keyHash, const void *key)
/*
** Same as PL_HashTableRawLookup but doesn't reorder the hash entries.
*/
-PR_IMPLEMENT(PLHashEntry *const *)
-PL_HashTableRawLookupConst(const PLHashTable *ht, PLHashNumber keyHash,
+PR_IMPLEMENT(PLHashEntry **)
+PL_HashTableRawLookupConst(PLHashTable *ht, PLHashNumber keyHash,
const void *key)
{
- PLHashEntry *he, *const *hep;
+ PLHashEntry *he, **hep;
PLHashNumber h;
#ifdef HASHMETER
@@ -380,7 +380,7 @@ PL_HashTableLookup(PLHashTable *ht, const void *key)
** Same as PL_HashTableLookup but doesn't reorder the hash entries.
*/
PR_IMPLEMENT(void *)
-PL_HashTableLookupConst(const PLHashTable *ht, const void *key)
+PL_HashTableLookupConst(PLHashTable *ht, const void *key)
{
PLHashNumber keyHash;
PLHashEntry *he, *const *hep;
diff --git a/lib/ds/plhash.h b/lib/ds/plhash.h
index 438dbd6a..e3cd7a63 100644
--- a/lib/ds/plhash.h
+++ b/lib/ds/plhash.h
@@ -105,7 +105,7 @@ PR_EXTERN(void *)
PL_HashTableLookup(PLHashTable *ht, const void *key);
PR_EXTERN(void *)
-PL_HashTableLookupConst(const PLHashTable *ht, const void *key);
+PL_HashTableLookupConst(PLHashTable *ht, const void *key);
PR_EXTERN(PRIntn)
PL_HashTableEnumerateEntries(PLHashTable *ht, PLHashEnumerator f, void *arg);
@@ -126,8 +126,8 @@ PL_CompareValues(const void *v1, const void *v2);
PR_EXTERN(PLHashEntry **)
PL_HashTableRawLookup(PLHashTable *ht, PLHashNumber keyHash, const void *key);
-PR_EXTERN(PLHashEntry *const *)
-PL_HashTableRawLookupConst(const PLHashTable *ht, PLHashNumber keyHash,
+PR_EXTERN(PLHashEntry **)
+PL_HashTableRawLookupConst(PLHashTable *ht, PLHashNumber keyHash,
const void *key);
PR_EXTERN(PLHashEntry *)