diff options
Diffstat (limited to 'generic/tclIO.c')
| -rw-r--r-- | generic/tclIO.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 44202a9..965a395 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -205,7 +205,7 @@ static int FlushChannel(Tcl_Interp *interp, Channel *chanPtr, int calledFromAsyncFlush); static int TclGetsObjBinary(Tcl_Channel chan, Tcl_Obj *objPtr); static Tcl_Encoding GetBinaryEncoding(void); -static Tcl_ExitProc FreeBinaryEncoding; +static void FreeBinaryEncoding(void); static Tcl_HashTable * GetChannelTable(Tcl_Interp *interp); static int GetInput(Channel *chanPtr); static void PeekAhead(Channel *chanPtr, char **dstEndPtr, @@ -695,6 +695,7 @@ TclFinalizeIOSubsystem(void) } } + FreeBinaryEncoding(); TclpFinalizeSockets(); TclpFinalizePipes(); } @@ -5290,8 +5291,7 @@ TclGetsObjBinary( */ static void -FreeBinaryEncoding( - TCL_UNUSED(void *)) +FreeBinaryEncoding(void) { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); @@ -5308,7 +5308,6 @@ GetBinaryEncoding(void) if (tsdPtr->binaryEncoding == NULL) { tsdPtr->binaryEncoding = Tcl_GetEncoding(NULL, "iso8859-1"); - Tcl_CreateThreadExitHandler(FreeBinaryEncoding, NULL); } if (tsdPtr->binaryEncoding == NULL) { Tcl_Panic("binary encoding is not available"); |
