summaryrefslogtreecommitdiffstats
path: root/generic/tcl.h
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2022-11-02 15:56:42 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2022-11-02 15:56:42 (GMT)
commit0dfd2bdc9def2f625b73fa3f8ca501d68ab24f98 (patch)
tree402bba327fb562ce946625d4ecab9a96a970a9d6 /generic/tcl.h
parent366778e86ecc27d557a56047f3f6d12439f67cf8 (diff)
downloadtcl-0dfd2bdc9def2f625b73fa3f8ca501d68ab24f98.zip
tcl-0dfd2bdc9def2f625b73fa3f8ca501d68ab24f98.tar.gz
tcl-0dfd2bdc9def2f625b73fa3f8ca501d68ab24f98.tar.bz2
Bug #0f98bce669 - string repeat support for > 2**31 characters
Diffstat (limited to 'generic/tcl.h')
-rw-r--r--generic/tcl.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index cb781a6..be39d2f 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -664,10 +664,11 @@ typedef union Tcl_ObjInternalRep { /* The internal representation: */
* or both.
*/
#if TCL_MAJOR_VERSION > 8
-# define Tcl_Size size_t
+typedef size_t Tcl_Size;
#else
-# define Tcl_Size int
+typedef int Tcl_Size;
#endif
+#define TCL_SIZE_SMAX ((((Tcl_Size) 1) << ((8*sizeof(Tcl_Size)) - 1)) - 1)
typedef struct Tcl_Obj {