summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclMain.c4
-rw-r--r--tests/utf.test9
2 files changed, 8 insertions, 5 deletions
diff --git a/generic/tclMain.c b/generic/tclMain.c
index 652074e..114d2c3 100644
--- a/generic/tclMain.c
+++ b/generic/tclMain.c
@@ -392,7 +392,7 @@ Tcl_MainEx(
/*
* Arrange for final deletion of the main interp
*/
- // ARGH Munchhausen effect
+ /* ARGH Munchhausen effect */
Tcl_CreateExitHandler(FreeMainInterp, (ClientData)interp);
}
@@ -928,7 +928,7 @@ FreeMainInterp(
{
Tcl_Interp *interp = (Tcl_Interp *) clientData;
- //if (TclInExit()) return;
+ /*if (TclInExit()) return;*/
if (!Tcl_InterpDeleted(interp)) {
Tcl_DeleteInterp(interp);
diff --git a/tests/utf.test b/tests/utf.test
index d319f6e..92b3a48 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -27,9 +27,12 @@ test utf-1.3 {Tcl_UniCharToUtf: 2 byte sequences} {
test utf-1.4 {Tcl_UniCharToUtf: 3 byte sequences} {
set x "\u4e4e"
} [bytestring "\xe4\xb9\x8e"]
-test utf-1.5 {Tcl_UniCharToUtf: negative Tcl_UniChar} {
- string length [format %c -1]
-} 1
+test utf-1.5 {Tcl_UniCharToUtf: overflowed Tcl_UniChar} {
+ format %c 0x110000
+} [bytestring "\xef\xbf\xbd"]
+test utf-1.6 {Tcl_UniCharToUtf: negative Tcl_UniChar} {
+ format %c -1
+} [bytestring "\xef\xbf\xbd"]
test utf-2.1 {Tcl_UtfToUniChar: low ascii} {
string length "abc"