summaryrefslogtreecommitdiffstats
path: root/win/tclWin32Dll.c
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2003-02-04 17:06:44 (GMT)
committervincentdarley <vincentdarley>2003-02-04 17:06:44 (GMT)
commit7d7c7570591f8383688fe05c69fdea70106a937e (patch)
treec50a993eca73882fec1db93099999bb362cc7278 /win/tclWin32Dll.c
parentadcc02b003f61baa6211d622e14acc3500be5327 (diff)
downloadtcl-7d7c7570591f8383688fe05c69fdea70106a937e.zip
tcl-7d7c7570591f8383688fe05c69fdea70106a937e.tar.gz
tcl-7d7c7570591f8383688fe05c69fdea70106a937e.tar.bz2
finalization and test fixes
Diffstat (limited to 'win/tclWin32Dll.c')
-rw-r--r--win/tclWin32Dll.c33
1 files changed, 29 insertions, 4 deletions
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c
index 62d9e1c..5b939f9 100644
--- a/win/tclWin32Dll.c
+++ b/win/tclWin32Dll.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWin32Dll.c,v 1.23 2003/01/25 14:11:32 mdejong Exp $
+ * RCS: @(#) $Id: tclWin32Dll.c,v 1.24 2003/02/04 17:06:52 vincentdarley Exp $
*/
#include "tclWinInt.h"
@@ -556,9 +556,37 @@ TclWinSetInterfaces(
/*
*---------------------------------------------------------------------------
*
+ * TclWinResetInterfaceEncodings --
+ *
+ * Called during finalization to free up any encodings we use.
+ * The tclWinProcs-> look up table is still ok to use after
+ * this call, provided no encoding conversion is required.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *---------------------------------------------------------------------------
+ */
+void
+TclWinResetInterfaceEncodings()
+{
+ if (tclWinTCharEncoding != NULL) {
+ Tcl_FreeEncoding(tclWinTCharEncoding);
+ tclWinTCharEncoding = NULL;
+ }
+}
+
+/*
+ *---------------------------------------------------------------------------
+ *
* TclWinResetInterfaces --
*
* Called during finalization to reset us to a safe state for reuse.
+ * After this call, it is best not to use the tclWinProcs-> look
+ * up table since it is likely to be different to what is expected.
*
* Results:
* None.
@@ -568,12 +596,9 @@ TclWinSetInterfaces(
*
*---------------------------------------------------------------------------
*/
-
void
TclWinResetInterfaces()
{
- Tcl_FreeEncoding(tclWinTCharEncoding);
- tclWinTCharEncoding = NULL;
tclWinProcs = &asciiProcs;
}