summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-02-04 16:24:14 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-02-04 16:24:14 (GMT)
commit4dd8f4fb7dd4484d1bfcc0910e9c7f901b83dcbd (patch)
tree67baf562f729c64cbdd175f9e69f6fc23528a5be /generic/tclEncoding.c
parenta72ae0f931f9ac8a78ef7b78f854ae68e66f9dd1 (diff)
parentae0cf24fb4a1c43bb6ffc8d5db7404a17bc3b8ea (diff)
downloadtcl-4dd8f4fb7dd4484d1bfcc0910e9c7f901b83dcbd.zip
tcl-4dd8f4fb7dd4484d1bfcc0910e9c7f901b83dcbd.tar.gz
tcl-4dd8f4fb7dd4484d1bfcc0910e9c7f901b83dcbd.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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 2cc55d6..d246cb2 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
@@ -567,7 +568,7 @@ TclInitEncodingSubsystem(void)
type.freeProc = NULL;
type.nullSize = 1;
type.clientData = NULL;
- Tcl_CreateEncoding(&type);
+ tclIdentityEncoding = Tcl_CreateEncoding(&type);
type.encodingName = "utf-8";
type.toUtfProc = UtfExtToUtfIntProc;
@@ -651,6 +652,7 @@ TclFinalizeEncodingSubsystem(void)
Tcl_MutexLock(&encodingMutex);
encodingsInitialized = 0;
FreeEncoding(systemEncoding);
+ FreeEncoding(tclIdentityEncoding);
hPtr = Tcl_FirstHashEntry(&encodingTable, &search);
while (hPtr != NULL) {