summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-10-13 16:43:05 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-10-13 16:43:05 (GMT)
commitdca9bb39489c9c228b3c1ccc6019e3cee3699c7a (patch)
treea65bf5c82a8f52d06cb1f4738862562c01a71f3c /generic/tclExecute.c
parent61df5f46580699c45d9263e3e98a0cf3f2006672 (diff)
downloadtcl-dca9bb39489c9c228b3c1ccc6019e3cee3699c7a.zip
tcl-dca9bb39489c9c228b3c1ccc6019e3cee3699c7a.tar.gz
tcl-dca9bb39489c9c228b3c1ccc6019e3cee3699c7a.tar.bz2
Stop invading the String internals to work around a bug. Fix it instead.
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index cd27f6b..56e3f72 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -19,7 +19,6 @@
#include "tclCompile.h"
#include "tclOOInt.h"
#include "tommath.h"
-#include "tclStringRep.h"
#include <math.h>
#include <assert.h>
@@ -5744,16 +5743,6 @@ TEBCresume(
if (length3 - 1 == toIdx - fromIdx) {
unsigned char *bytes1, *bytes2;
- /*
- * Flush the info in the string internal rep that refers to the
- * about-to-be-invalidated UTF-8 rep. This indicates that a new
- * buffer needs to be allocated, and assumes that the value is
- * already of tclStringTypePtr type, which should be true provided
- * we call it after Tcl_GetUnicodeFromObj.
- */
-#define MarkStringInternalRepForFlush(objPtr) \
- (GET_STRING(objPtr)->allocated = 0)
-
if (Tcl_IsShared(valuePtr)) {
objResultPtr = Tcl_DuplicateObj(valuePtr);
if (TclIsPureByteArray(objResultPtr)
@@ -5766,7 +5755,6 @@ TEBCresume(
ustring2 = Tcl_GetUnicodeFromObj(value3Ptr, NULL);
memcpy(ustring1 + fromIdx, ustring2,
length3 * sizeof(Tcl_UniChar));
- MarkStringInternalRepForFlush(objResultPtr);
}
Tcl_InvalidateStringRep(objResultPtr);
TclDecrRefCount(value3Ptr);
@@ -5783,7 +5771,6 @@ TEBCresume(
ustring2 = Tcl_GetUnicodeFromObj(value3Ptr, NULL);
memcpy(ustring1 + fromIdx, ustring2,
length3 * sizeof(Tcl_UniChar));
- MarkStringInternalRepForFlush(valuePtr);
}
Tcl_InvalidateStringRep(valuePtr);
TclDecrRefCount(value3Ptr);