summaryrefslogtreecommitdiffstats
path: root/generic/tcl.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-07-12 13:44:26 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-07-12 13:44:26 (GMT)
commit71e7049f8ea65780583e847f2b3055b519395517 (patch)
treeed2a2c3cdb9d99794e2c09daee427b78362051b3 /generic/tcl.h
parent7ad31bb0a3bc7e0e2a4a4ce4c6f05eb21f250f64 (diff)
downloadtcl-71e7049f8ea65780583e847f2b3055b519395517.zip
tcl-71e7049f8ea65780583e847f2b3055b519395517.tar.gz
tcl-71e7049f8ea65780583e847f2b3055b519395517.tar.bz2
Make hash type changable by compiling with -DTCL_HASH_TYPE=size_t (for example). Default (unsigned) cannot be changed in Tcl 8.x, that must wait until Tcl 9.
Diffstat (limited to 'generic/tcl.h')
-rw-r--r--generic/tcl.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index 6061ea8..ded8d0b 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -1157,11 +1157,15 @@ typedef struct Tcl_DString {
* Forward declarations of Tcl_HashTable and related types.
*/
+#ifndef TCL_HASH_TYPE
+# define TCL_HASH_TYPE unsigned
+#endif
+
typedef struct Tcl_HashKeyType Tcl_HashKeyType;
typedef struct Tcl_HashTable Tcl_HashTable;
typedef struct Tcl_HashEntry Tcl_HashEntry;
-typedef unsigned (Tcl_HashKeyProc) (Tcl_HashTable *tablePtr, void *keyPtr);
+typedef TCL_HASH_TYPE (Tcl_HashKeyProc) (Tcl_HashTable *tablePtr, void *keyPtr);
typedef int (Tcl_CompareHashKeysProc) (void *keyPtr, Tcl_HashEntry *hPtr);
typedef Tcl_HashEntry * (Tcl_AllocHashEntryProc) (Tcl_HashTable *tablePtr,
void *keyPtr);