summaryrefslogtreecommitdiffstats
path: root/generic/tcl.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-12-20 12:02:34 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-12-20 12:02:34 (GMT)
commit1b40a626117127b6161f9c9edd7b60c345051b05 (patch)
treed23154e3be0ba8a3ee104b1ab65ace9b34279442 /generic/tcl.h
parent2bfe68441a03d2363dddceaaf87bf7e059c59e38 (diff)
downloadtcl-1b40a626117127b6161f9c9edd7b60c345051b05.zip
tcl-1b40a626117127b6161f9c9edd7b60c345051b05.tar.gz
tcl-1b40a626117127b6161f9c9edd7b60c345051b05.tar.bz2
Change hash/index/mask fields to type "unsigned int", because that's how hash values are generally stored. This eliminates the need for PTR2UINT/UINT2PTR in various places.
Diffstat (limited to 'generic/tcl.h')
-rw-r--r--generic/tcl.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index 688d678..197aa9b 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -1127,9 +1127,7 @@ struct Tcl_HashEntry {
Tcl_HashEntry *nextPtr; /* Pointer to next entry in this hash bucket,
* or NULL for end of chain. */
Tcl_HashTable *tablePtr; /* Pointer to table containing entry. */
- void *hash; /* Hash value, stored as pointer to ensure
- * that the offsets of the fields in this
- * structure are not changed. */
+ unsigned int hash; /* Hash value. */
ClientData clientData; /* Application stores something here with
* Tcl_SetHashValue. */
union { /* Key has one of these forms: */
@@ -1224,10 +1222,10 @@ struct Tcl_HashTable {
* table. */
int rebuildSize; /* Enlarge table when numEntries gets to be
* this large. */
+ unsigned int mask; /* Mask value used in hashing function. */
int downShift; /* Shift count used in hashing function.
* Designed to use high-order bits of
* randomized keys. */
- int mask; /* Mask value used in hashing function. */
int keyType; /* Type of keys used in this table. It's
* either TCL_CUSTOM_KEYS, TCL_STRING_KEYS,
* TCL_ONE_WORD_KEYS, or an integer giving the