diff options
author | sebres <sebres@users.sourceforge.net> | 2019-05-21 11:22:36 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2019-05-21 11:22:36 (GMT) |
commit | d6f4d3d00d09d00c1112ae20f067ee4cfb4c7ee1 (patch) | |
tree | 7630a208d870b57ed6bca6dd298c18112c42dfbb /generic/tclHash.c | |
parent | cc25f59b14793bb945043ac65ebfca08d50979b5 (diff) | |
download | tcl-d6f4d3d00d09d00c1112ae20f067ee4cfb4c7ee1.zip tcl-d6f4d3d00d09d00c1112ae20f067ee4cfb4c7ee1.tar.gz tcl-d6f4d3d00d09d00c1112ae20f067ee4cfb4c7ee1.tar.bz2 |
cherry-picing of [3f693cdfe9c875c4] to be more compatible across version, resolve mistake with "key objects/pointers comparison by the hash entry" firstly introduced there.
Diffstat (limited to 'generic/tclHash.c')
-rw-r--r-- | generic/tclHash.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclHash.c b/generic/tclHash.c index 5d6ea86..837a167 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -324,7 +324,10 @@ CreateHashEntry( continue; } #endif - if (compareKeysProc((VOID *) key, hPtr)) { + /* if keys pointers or values are equal */ + if (((void *) key == hPtr->key.oneWordValue) + || compareKeysProc((VOID *) key, hPtr) + ) { if (newPtr) { *newPtr = 0; } |