diff options
author | hobbs <hobbs> | 2002-12-06 23:22:58 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2002-12-06 23:22:58 (GMT) |
commit | 25434df7c01e5696ea3b4affeed85ad22d09587b (patch) | |
tree | 5e8124bd90814fbe5a1f2116ec1fb5a93273caed /win/tclWin32Dll.c | |
parent | 5bde345b62e89154c0dfe9f36adad96e97e69323 (diff) | |
download | tcl-25434df7c01e5696ea3b4affeed85ad22d09587b.zip tcl-25434df7c01e5696ea3b4affeed85ad22d09587b.tar.gz tcl-25434df7c01e5696ea3b4affeed85ad22d09587b.tar.bz2 |
* generic/tclStubInit.c: regen
* generic/tclIntPlatDecls.h: regen
* generic/tclInt.decls: added TclWinResetInterface
* win/tclWin32Dll.c (TclWinResetInterfaces):
* win/tclWinInit.c (TclpSetInitialEncodings, WinEncodingsCleanup):
add exit handler that resets the encoding information to a state
where we can reuse Tcl. Following these changes, it is possible
to reuse Tcl (following Tcl_FindExecutable or Tcl_CreateInterp)
following a Tcl_Finalize.
Diffstat (limited to 'win/tclWin32Dll.c')
-rw-r--r-- | win/tclWin32Dll.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index d3a1172..506cf78 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.17 2002/10/29 14:17:58 vincentdarley Exp $ + * RCS: @(#) $Id: tclWin32Dll.c,v 1.18 2002/12/06 23:22:59 hobbs Exp $ */ #include "tclWinInt.h" @@ -512,6 +512,30 @@ TclWinSetInterfaces( /* *--------------------------------------------------------------------------- * + * TclWinResetInterfaces -- + * + * Called during finalization to reset us to a safe state for reuse. + * + * Results: + * None. + * + * Side effects: + * None. + * + *--------------------------------------------------------------------------- + */ + +void +TclWinResetInterfaces() +{ + Tcl_FreeEncoding(tclWinTCharEncoding); + tclWinTCharEncoding = NULL; + tclWinProcs = &asciiProcs; +} + +/* + *--------------------------------------------------------------------------- + * * Tcl_WinUtfToTChar, Tcl_WinTCharToUtf -- * * Convert between UTF-8 and Unicode when running Windows NT or |