diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-22 20:07:43 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-22 20:07:43 (GMT) |
| commit | 5516772e8b562cfd568293d3616bf1a0f493b752 (patch) | |
| tree | 393f1847f7b918d84005c089e8c81113e6ee3e5b /generic/tclStringRep.h | |
| parent | d4c27c94668a30f48edee251104255b27230107e (diff) | |
| parent | abccdbc60065601867bb37fbaa0313341abc1b7d (diff) | |
| download | tcl-5516772e8b562cfd568293d3616bf1a0f493b752.zip tcl-5516772e8b562cfd568293d3616bf1a0f493b752.tar.gz tcl-5516772e8b562cfd568293d3616bf1a0f493b752.tar.bz2 | |
Merge 8.7
Diffstat (limited to 'generic/tclStringRep.h')
| -rw-r--r-- | generic/tclStringRep.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclStringRep.h b/generic/tclStringRep.h index cac4d0b..faa2c2c 100644 --- a/generic/tclStringRep.h +++ b/generic/tclStringRep.h @@ -60,14 +60,14 @@ typedef struct { } String; #define STRING_MAXCHARS \ - (int)(((size_t)UINT_MAX - 1 - offsetof(String, unicode))/sizeof(unsigned short)) + (int)(((size_t)UINT_MAX - offsetof(String, unicode))/sizeof(unsigned short) - 1) #define STRING_SIZE(numChars) \ - (offsetof(String, unicode) + (((numChars) + 1U) * sizeof(unsigned short))) + (offsetof(String, unicode) + sizeof(unsigned short) + ((numChars) * sizeof(unsigned short))) #define stringCheckLimits(numChars) \ do { \ if ((numChars) < 0 || (numChars) > STRING_MAXCHARS) { \ Tcl_Panic("max length for a Tcl unicode value (%d chars) exceeded", \ - (int)STRING_MAXCHARS); \ + STRING_MAXCHARS); \ } \ } while (0) #define stringAttemptAlloc(numChars) \ |
