summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2014-02-04 15:17:12 (GMT)
committerdgp@users.sourceforge.net <dgp>2014-02-04 15:17:12 (GMT)
commit7162cfbb23199e7f7bb0d581893ff081275afb88 (patch)
treeda77e345963b52bd809d1ed5d0911aacc39725d5 /generic/tclEncoding.c
parent6c9c655a1a7de8c2624ef5a5d2f697cd3aaca53d (diff)
parent8af0f5ddf9ca33e00cd2dcdfeb606dd4f63ec240 (diff)
downloadtcl-7162cfbb23199e7f7bb0d581893ff081275afb88.zip
tcl-7162cfbb23199e7f7bb0d581893ff081275afb88.tar.gz
tcl-7162cfbb23199e7f7bb0d581893ff081275afb88.tar.bz2
Simplify the core output operations of channels. Reduce duplicative and
dead code.
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index c2f1b4b..1842fb6 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -182,6 +182,7 @@ TCL_DECLARE_MUTEX(encodingMutex)
static Tcl_Encoding defaultEncoding;
static Tcl_Encoding systemEncoding;
+Tcl_Encoding tclIdentityEncoding;
/*
* The following variable is used in the sparse matrix code for a
@@ -566,6 +567,7 @@ TclInitEncodingSubsystem(void)
type.clientData = NULL;
defaultEncoding = Tcl_CreateEncoding(&type);
+ tclIdentityEncoding = Tcl_GetEncoding(NULL, type.encodingName);
systemEncoding = Tcl_GetEncoding(NULL, type.encodingName);
type.encodingName = "utf-8";
@@ -656,6 +658,7 @@ TclFinalizeEncodingSubsystem(void)
Tcl_MutexLock(&encodingMutex);
encodingsInitialized = 0;
FreeEncoding(systemEncoding);
+ FreeEncoding(tclIdentityEncoding);
hPtr = Tcl_FirstHashEntry(&encodingTable, &search);
while (hPtr != NULL) {