diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-31 22:03:55 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-31 22:03:55 (GMT) |
| commit | ffbc0140dad42d5145da92f1a68b45f5d217d86e (patch) | |
| tree | b1768aeba6a5fe1da6a3e674736623f3fe9e1073 /generic/tclStringObj.c | |
| parent | b953a1cce7d339f6a522a656d58f08a156190583 (diff) | |
| download | tcl-ffbc0140dad42d5145da92f1a68b45f5d217d86e.zip tcl-ffbc0140dad42d5145da92f1a68b45f5d217d86e.tar.gz tcl-ffbc0140dad42d5145da92f1a68b45f5d217d86e.tar.bz2 | |
Enhance documentations. Move TCL_INDEX_NONE from tclInt.h to tcl.h, since it's too useful.
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 590b1bd..9fc8a2b 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; } } |
