Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2015-01-26
16:39 • Ticket [3009403fff] Signature of Tcl_GetHashKey, Tcl_(Create|Find)HashEntry ... artifact: fa66934a7a user: dgp
2010-08-17
01:13 • Closed ticket [3009403fff]. artifact: d845a9f599 user: dgp
2010-08-16
08:44 • Ticket [3009403fff]: 4 changes artifact: 56c46a0fe7 user: nijtmans
2010-08-15
08:41 • Ticket [3009403fff]: 2 changes artifact: 903eb0a656 user: dgp
03:59 • Ticket [3009403fff]: 5 changes artifact: df97a6555a user: nijtmans
2010-05-31
16:49 • Ticket [3009403fff]: 4 changes artifact: 1f162ecd63 user: nijtmans
16:49 • Add attachment hash.patch to ticket [3009403fff] artifact: 5ed3621d6e user: nijtmans
09:49 • New ticket [3009403fff] Signature of Tcl_GetHashKey, Tcl_(Create|Find)HashEntry<... artifact: f192a955b3 user: nijtmans

Signature of Tcl_GetHashKey, Tcl_(Create|Find)HashEntry

Closed / Fixed3009403fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 12 years ago
Descriptionplain2010-05-31 09:49:31
The signatures of those functions use "char *" resp.
"const char *" in their signatures. However, keys in
hash tables, can be anything, so using "char" here
means that type casts are needed in many current
code using hash tables.

At first sight, this might seem a binary incompatible
change to change this , because on some platforms
"char *" does not have the same size as "void *".
However, those 3 functions are in reality macros
defined in tcl.h, which eventuall call functions
whose signature is not changed. So: this
change is 100% source and binary compatible!

Here is the suggested patch.

Because Tcl_(Create|Find)HashEntry is in the
stub table, (but cannot actually be used, see
Bug #3007895), this patch is better used
in combination with #3007895. Otherwise
people might wonder why the signatures
of those stub table entries don't match the
doc and the macros.
nijtmansplain2010-05-31 16:49:31
File Added - 375686: hash.patch
nijtmansplain2010-08-15 03:59:43
signature change checked in HEAD
dgp Ticket [3009403fff]: 2 changes [History diff]2010-08-15 08:41:31
nijtmansplain2010-08-16 08:44:48
Don, does this mean you are evaluating this? Great!
dgpplain2010-08-17 01:13:44
allow_comments - 1

Don't see any problem with this.

Agree that as long as this is done, it's
better to get 3007895 done too.
dgpplain2015-01-26 16:39:15
Just for the record, this caused some source incompat
trouble with Itk 4 sources.  Not difficult to resolve.
Log in (anonymous is fine) to add a comment.

Attachments: