diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-05-31 12:50:04 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-05-31 12:50:04 (GMT) |
commit | 84b9d03fb02b9ee744e03775f590d49f105d23f8 (patch) | |
tree | 5744c424eb00548acf667916895305f874909917 /generic/tclStringObj.c | |
parent | 2ed71e62a0e1b2fc0b0dca264ffa417ba2d9b159 (diff) | |
parent | a2a03ea8fb6718cc472cc7dcb44f8e68aadb24ba (diff) | |
download | tcl-84b9d03fb02b9ee744e03775f590d49f105d23f8.zip tcl-84b9d03fb02b9ee744e03775f590d49f105d23f8.tar.gz tcl-84b9d03fb02b9ee744e03775f590d49f105d23f8.tar.bz2 |
TIP 537 implementation: Enable 64-bit indexes in regexp matching
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r-- | generic/tclStringObj.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index a18c13e..f74d13d 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -1404,7 +1404,7 @@ AppendUnicodeToUnicodeRep( numChars = stringPtr->numChars + appendNumChars; if (numChars > stringPtr->maxChars) { - size_t offset = TCL_AUTO_LENGTH; + size_t index = TCL_INDEX_NONE; /* * Protect against case where unicode points into the existing @@ -1414,7 +1414,7 @@ AppendUnicodeToUnicodeRep( if (unicode && unicode >= stringPtr->unicode && unicode <= stringPtr->unicode + stringPtr->maxChars) { - offset = unicode - stringPtr->unicode; + index = unicode - stringPtr->unicode; } GrowUnicodeBuffer(objPtr, numChars); @@ -1424,8 +1424,8 @@ AppendUnicodeToUnicodeRep( * Relocate unicode if needed; see above. */ - if (offset != TCL_AUTO_LENGTH) { - unicode = stringPtr->unicode + offset; + if (index != TCL_INDEX_NONE) { + unicode = stringPtr->unicode + index; } } |