diff options
author | nijtmans <nijtmans@noemail.net> | 2008-11-14 00:22:38 (GMT) |
---|---|---|
committer | nijtmans <nijtmans@noemail.net> | 2008-11-14 00:22:38 (GMT) |
commit | 2c65582c5107bb91424de41ea9161feaa75d2f3a (patch) | |
tree | 4a1ebcbeafbfabd4f034af76e1a1e6d6397fa3e6 /generic/tclLoad.c | |
parent | 91c8ba844853997363dd06a02c291898cb578c45 (diff) | |
download | tcl-2c65582c5107bb91424de41ea9161feaa75d2f3a.zip tcl-2c65582c5107bb91424de41ea9161feaa75d2f3a.tar.gz tcl-2c65582c5107bb91424de41ea9161feaa75d2f3a.tar.bz2 |
Fixed [Bug 2269431]: load of shared objects
leaves emporary files on windows
FossilOrigin-Name: c651428b00d6b44ab27aa64a0963860a043f41a7
Diffstat (limited to 'generic/tclLoad.c')
-rw-r--r-- | generic/tclLoad.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/tclLoad.c b/generic/tclLoad.c index 89e003c..90fe79c 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.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: tclLoad.c,v 1.16.4.1 2008/10/07 20:51:46 nijtmans Exp $ + * RCS: @(#) $Id: tclLoad.c,v 1.16.4.2 2008/11/14 00:22:39 nijtmans Exp $ */ #include "tclInt.h" @@ -795,7 +795,7 @@ Tcl_UnloadObjCmd( if (unLoadProcPtr != NULL) { Tcl_MutexLock(&packageMutex); - if (pkgPtr->unloadProc != NULL) { + if ((pkgPtr->unloadProc != NULL) || (unLoadProcPtr == TclFSUnloadTempFile)) { (*unLoadProcPtr)(pkgPtr->loadHandle); } @@ -1154,7 +1154,9 @@ TclFinalizeLoad(void) if (pkgPtr->fileName[0] != '\0') { Tcl_FSUnloadFileProc *unLoadProcPtr = pkgPtr->unLoadProcPtr; - if ((unLoadProcPtr != NULL) && (pkgPtr->unloadProc != NULL)) { + if ((unLoadProcPtr != NULL) + && ((pkgPtr->unloadProc != NULL) + || (unLoadProcPtr == TclFSUnloadTempFile))) { (*unLoadProcPtr)(pkgPtr->loadHandle); } } |