summaryrefslogtreecommitdiffstats
path: root/generic/tclLoad.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2008-11-13 22:34:33 (GMT)
committernijtmans <nijtmans>2008-11-13 22:34:33 (GMT)
commit1dc34345abbeeb394c746abc809889b36af93584 (patch)
tree5e0965c72984533c7c66feaa10fdbbda08db3006 /generic/tclLoad.c
parente1dd76f8cbed9c460c1787cd88d0a058a6d46c7c (diff)
downloadtcl-1dc34345abbeeb394c746abc809889b36af93584.zip
tcl-1dc34345abbeeb394c746abc809889b36af93584.tar.gz
tcl-1dc34345abbeeb394c746abc809889b36af93584.tar.bz2
rename static function FSUnloadTempFile to
TclFSUnloadTempFile, needed in tclLoad.c Fixed [Bug 2269431]: load of shared objects leaves temporary files on windows
Diffstat (limited to 'generic/tclLoad.c')
-rw-r--r--generic/tclLoad.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/generic/tclLoad.c b/generic/tclLoad.c
index 36a61b0..c2a677b 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.20 2008/10/16 22:34:18 nijtmans Exp $
+ * RCS: @(#) $Id: tclLoad.c,v 1.21 2008/11/13 22:34:33 nijtmans Exp $
*/
#include "tclInt.h"
@@ -791,7 +791,7 @@ Tcl_UnloadObjCmd(
if (unLoadProcPtr != NULL) {
Tcl_MutexLock(&packageMutex);
- if (pkgPtr->unloadProc != NULL) {
+ if ((pkgPtr->unloadProc != NULL) || (unLoadProcPtr == TclFSUnloadTempFile)) {
unLoadProcPtr(pkgPtr->loadHandle);
}
@@ -1146,8 +1146,11 @@ TclFinalizeLoad(void)
*/
if (pkgPtr->fileName[0] != '\0') {
- if ((pkgPtr->unLoadProcPtr != NULL) && (pkgPtr->unloadProc != NULL)) {
- pkgPtr->unLoadProcPtr(pkgPtr->loadHandle);
+ Tcl_FSUnloadFileProc *unLoadProcPtr = pkgPtr->unLoadProcPtr;
+ if ((unLoadProcPtr != NULL)
+ && ((pkgPtr->unloadProc != NULL)
+ || (unLoadProcPtr == TclFSUnloadTempFile))) {
+ unLoadProcPtr(pkgPtr->loadHandle);
}
}
#endif