diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-12-19 10:42:42 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-12-19 10:42:42 (GMT) |
| commit | a728d03f7d2b232dbc44f2669d8eb326b1029d3d (patch) | |
| tree | 5e462694ca52e0a37de87c6786d4028e6da22080 /generic/tcl.h | |
| parent | 82903a4b1fb9b7ea432581d5c197770473c49021 (diff) | |
| parent | 89f9758279f36f87e7b7efa0c7b2358635a1ea10 (diff) | |
| download | tcl-a728d03f7d2b232dbc44f2669d8eb326b1029d3d.zip tcl-a728d03f7d2b232dbc44f2669d8eb326b1029d3d.tar.gz tcl-a728d03f7d2b232dbc44f2669d8eb326b1029d3d.tar.bz2 | |
merge novem
Diffstat (limited to 'generic/tcl.h')
| -rw-r--r-- | generic/tcl.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 37e0b19..f63b14b 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -960,10 +960,8 @@ 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. */ - ClientData clientData; /* Application stores something here with + size_t hash; /* Hash value. */ + void *clientData; /* Application stores something here with * Tcl_SetHashValue. */ union { /* Key has one of these forms: */ char *oneWordValue; /* One-word value for key. */ @@ -1057,10 +1055,10 @@ struct Tcl_HashTable { * table. */ size_t rebuildSize; /* Enlarge table when numEntries gets to be * this large. */ + size_t 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 @@ -1099,9 +1097,9 @@ typedef struct Tcl_HashSearch { * TCL_CUSTOM_PTR_KEYS: The keys are pointers to arbitrary types, the * pointer is stored in the entry. * - * While maintaining binary compatability the above have to be distinct values + * While maintaining binary compatibility the above have to be distinct values * as they are used to differentiate between old versions of the hash table - * which don't have a typePtr and new ones which do. Once binary compatability + * which don't have a typePtr and new ones which do. Once binary compatibility * is discarded in favour of making more wide spread changes TCL_STRING_KEYS * can be the same as TCL_CUSTOM_TYPE_KEYS, and TCL_ONE_WORD_KEYS can be the * same as TCL_CUSTOM_PTR_KEYS because they simply determine how the key is @@ -2354,7 +2352,7 @@ TCLAPI void Tcl_GetMemoryInfo(Tcl_DString *dsPtr); */ #define Tcl_GetHashValue(h) ((h)->clientData) -#define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value)) +#define Tcl_SetHashValue(h, value) ((h)->clientData = (void *) (value)) #define Tcl_GetHashKey(tablePtr, h) \ ((void *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS || \ (tablePtr)->keyType == TCL_CUSTOM_PTR_KEYS) \ |
