summaryrefslogtreecommitdiffstats
path: root/generic/tclDictObj.c
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2024-04-12 21:13:23 (GMT)
committersebres <sebres@users.sourceforge.net>2024-04-12 21:13:23 (GMT)
commitd57677488f057b142552a7611ebd5dd23e0cf359 (patch)
treeb2a37e16030c4b79695605fa0c7d2c32403e6a2f /generic/tclDictObj.c
parent67b780c161dd0f32a2780ea1465999daba7f941e (diff)
downloadtcl-d57677488f057b142552a7611ebd5dd23e0cf359.zip
tcl-d57677488f057b142552a7611ebd5dd23e0cf359.tar.gz
tcl-d57677488f057b142552a7611ebd5dd23e0cf359.tar.bz2
amend to [295b0570ff660950]: the bug was fixed incompletely, this is full bug fix now - don't allow direct compare if keys contain values rather than pointers.
introduced new hash-key type flag TCL_HASH_KEY_DIRECT_COMPARE... I know it is public interface, but the bug is grave, and I don't know how one could fix it without that, by retaining same performance for pointer hashes (e. g. vars, dicts and all of TclObjs).
Diffstat (limited to 'generic/tclDictObj.c')
-rw-r--r--generic/tclDictObj.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c
index bde8162..3a02bbd 100644
--- a/generic/tclDictObj.c
+++ b/generic/tclDictObj.c
@@ -168,7 +168,7 @@ Tcl_ObjType tclDictType = {
static Tcl_HashKeyType chainHashType = {
TCL_HASH_KEY_TYPE_VERSION,
- 0,
+ TCL_HASH_KEY_DIRECT_COMPARE, /* allows compare keys by pointers */
TclHashObjKey,
TclCompareObjKeys,
AllocChainEntry,