Skip to content
Tcl Source Code Changes To Hash Tables
Login

Changes To Hash Tables

Changes to "Hash Tables" between 2014-09-09 21:56:07 and 2014-09-09 21:56:24

︙
46
47
48
49
50
51
52
53

54
55
56
57
58
59
60
46
47
48
49
50
51
52

53
54
55
56
57
58
59
60







-
+







requires significant effort to maintain all the necessary compatibilities.
The <b>Tcl_HashKeyType</b> struct possesses the first enabler of such
a scheme -- a version field, but there's been either no need or no ability
to revise that struct.  In contrast, the <b>Tcl_HashEntry</b> struct
has effectively had its bucketPtr field replaced by a hash field and without
a version field in place, the illusion that we still support callers who want
to keep using the bucketPtr field is something of a cruel joke.  The Tcl
library (and the tclHash.c file) gets built with <b>TCL_HASH_KEY_STORE_HASH<b>
library (and the tclHash.c file) gets built with <b>TCL_HASH_KEY_STORE_HASH</b>
either set to 1 or not.  After that, the routines do what they do, and any caller
expecting the other setting is just going to be broken.  What's in place is at
best a measure of source compatibility helpful only to those who lift Tcl's
source code and copy it into their own programs.

The advantage of static Tcl_HashTable allocation by callers is diminished by
the fact that the routines in this module only function if thread isolation is
︙