summaryrefslogtreecommitdiffstats
path: root/generic/tclHash.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclHash.c')
-rw-r--r--generic/tclHash.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/generic/tclHash.c b/generic/tclHash.c
index 45726d9..ae2eca8 100644
--- a/generic/tclHash.c
+++ b/generic/tclHash.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclHash.c,v 1.12 2002/11/12 02:23:18 hobbs Exp $
+ * RCS: @(#) $Id: tclHash.c,v 1.12.2.1 2004/11/11 01:18:07 das Exp $
*/
#include "tclInt.h"
@@ -316,6 +316,7 @@ Tcl_FindHashEntry(tablePtr, key)
*/
if (typePtr->compareKeysProc) {
+ Tcl_CompareHashKeysProc *compareKeysProc = typePtr->compareKeysProc;
for (hPtr = tablePtr->buckets[index]; hPtr != NULL;
hPtr = hPtr->nextPtr) {
#if TCL_HASH_KEY_STORE_HASH
@@ -323,7 +324,7 @@ Tcl_FindHashEntry(tablePtr, key)
continue;
}
#endif
- if (typePtr->compareKeysProc ((VOID *) key, hPtr)) {
+ if (compareKeysProc ((VOID *) key, hPtr)) {
return hPtr;
}
}
@@ -414,6 +415,7 @@ Tcl_CreateHashEntry(tablePtr, key, newPtr)
*/
if (typePtr->compareKeysProc) {
+ Tcl_CompareHashKeysProc *compareKeysProc = typePtr->compareKeysProc;
for (hPtr = tablePtr->buckets[index]; hPtr != NULL;
hPtr = hPtr->nextPtr) {
#if TCL_HASH_KEY_STORE_HASH
@@ -421,7 +423,7 @@ Tcl_CreateHashEntry(tablePtr, key, newPtr)
continue;
}
#endif
- if (typePtr->compareKeysProc ((VOID *) key, hPtr)) {
+ if (compareKeysProc ((VOID *) key, hPtr)) {
*newPtr = 0;
return hPtr;
}
@@ -703,13 +705,14 @@ Tcl_NextHashEntry(searchPtr)
* Tcl_FirstHashEntry. */
{
Tcl_HashEntry *hPtr;
+ Tcl_HashTable *tablePtr = searchPtr->tablePtr;
while (searchPtr->nextEntryPtr == NULL) {
- if (searchPtr->nextIndex >= searchPtr->tablePtr->numBuckets) {
+ if (searchPtr->nextIndex >= tablePtr->numBuckets) {
return NULL;
}
searchPtr->nextEntryPtr =
- searchPtr->tablePtr->buckets[searchPtr->nextIndex];
+ tablePtr->buckets[searchPtr->nextIndex];
searchPtr->nextIndex++;
}
hPtr = searchPtr->nextEntryPtr;