summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2014-02-25 15:59:46 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2014-02-25 15:59:46 (GMT)
commit7c6802ac2c0c47857d3597536ae3b733239305ba (patch)
tree53831b52abfd756ed7ea2c55259e485020fbd3b8
parent1b3c04c035c65d62a97f6e313d435fc6b256266b (diff)
parent259729fa361e6d184ef91be067a93309e14cd998 (diff)
downloadtcl-7c6802ac2c0c47857d3597536ae3b733239305ba.zip
tcl-7c6802ac2c0c47857d3597536ae3b733239305ba.tar.gz
tcl-7c6802ac2c0c47857d3597536ae3b733239305ba.tar.bz2
merge trunk
-rw-r--r--generic/tclExecute.c3
-rw-r--r--tests/string.test9
2 files changed, 12 insertions, 0 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 9607d6e..cd0371b 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -5260,6 +5260,7 @@ TEBCresume(
} else {
length = Tcl_UtfToUpper(TclGetString(valuePtr));
Tcl_SetObjLength(valuePtr, length);
+ TclFreeIntRep(valuePtr);
TRACE_APPEND(("\"%.20s\"\n", O2S(valuePtr)));
NEXT_INST_F(1, 0, 0);
}
@@ -5276,6 +5277,7 @@ TEBCresume(
} else {
length = Tcl_UtfToLower(TclGetString(valuePtr));
Tcl_SetObjLength(valuePtr, length);
+ TclFreeIntRep(valuePtr);
TRACE_APPEND(("\"%.20s\"\n", O2S(valuePtr)));
NEXT_INST_F(1, 0, 0);
}
@@ -5292,6 +5294,7 @@ TEBCresume(
} else {
length = Tcl_UtfToTitle(TclGetString(valuePtr));
Tcl_SetObjLength(valuePtr, length);
+ TclFreeIntRep(valuePtr);
TRACE_APPEND(("\"%.20s\"\n", O2S(valuePtr)));
NEXT_INST_F(1, 0, 0);
}
diff --git a/tests/string.test b/tests/string.test
index 1b0486c..45efe37 100644
--- a/tests/string.test
+++ b/tests/string.test
@@ -1398,6 +1398,9 @@ test string-15.9 {string tolower} {
test string-15.10 {string tolower, unicode} {
string tolower ABCabc\xc7\xe7
} "abcabc\xe7\xe7"
+test string-15.11 {string tolower, compiled} {
+ lindex [string tolower [list A B [list C]]] 1
+} b
test string-16.1 {string toupper} {
list [catch {string toupper} msg] $msg
@@ -1429,6 +1432,9 @@ test string-16.9 {string toupper} {
test string-16.10 {string toupper, unicode} {
string toupper ABCabc\xc7\xe7
} "ABCABC\xc7\xc7"
+test string-16.11 {string toupper, compiled} {
+ lindex [string toupper [list a b [list c]]] 1
+} B
test string-17.1 {string totitle} {
list [catch {string totitle} msg] $msg
@@ -1451,6 +1457,9 @@ test string-17.6 {string totitle, unicode} {
test string-17.7 {string totitle, unicode} {
string totitle \u01f3BCabc\xc7\xe7
} "\u01f2bcabc\xe7\xe7"
+test string-17.8 {string totitle, compiled} {
+ lindex [string totitle [list aa bb [list cc]]] 0
+} Aa
test string-18.1 {string trim} {
list [catch {string trim} msg] $msg