summaryrefslogtreecommitdiffstats
path: root/generic/tclIOUtil.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-10-09 20:42:00 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-10-09 20:42:00 (GMT)
commita2e046c6cbf61727953e36e6b9a3e83e1ce340dc (patch)
tree5169193c56b3d720abc1f802c143a13462d1cc1c /generic/tclIOUtil.c
parent688957f0978b139aa8fe7ad649190f9b5099f62e (diff)
parenta74d73bc13dd4961d02d3974912000145bff5d1a (diff)
downloadtcl-a2e046c6cbf61727953e36e6b9a3e83e1ce340dc.zip
tcl-a2e046c6cbf61727953e36e6b9a3e83e1ce340dc.tar.gz
tcl-a2e046c6cbf61727953e36e6b9a3e83e1ce340dc.tar.bz2
Merge 8.6
Diffstat (limited to 'generic/tclIOUtil.c')
-rw-r--r--generic/tclIOUtil.c85
1 files changed, 0 insertions, 85 deletions
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index a0e968f..2986949 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -3609,91 +3609,6 @@ Tcl_FSUnloadFile(
}
/*
- *----------------------------------------------------------------------
- *
- * TclFSUnloadTempFile --
- *
- * Unloads an object loaded via temporary file from a virtual filesystem
- * to a native filesystem.
- *
- * Results:
- * None.
- *
- * Side effects:
- * Frees resources for the loaded object and deletes the temporary file.
- *
- *----------------------------------------------------------------------
- */
-
-void
-TclFSUnloadTempFile(
- Tcl_LoadHandle loadHandle) /* A handle for the object, as provided by a
- * previous call to Tcl_FSLoadFile(). */
-{
- FsDivertLoad *tvdlPtr = (FsDivertLoad *) loadHandle;
-
- if (tvdlPtr == NULL) {
- /*
- * tvdlPtr was provided by Tcl_LoadFile so it should not be NULL here.
- */
- return;
- }
-
- if (tvdlPtr->unloadProcPtr != NULL) {
- /*
- * 'unloadProcPtr' must be called first so that the shared library is
- * actually unloaded by the OS. Otherwise, the following 'delete' may
- * well fail because the shared library is still in use.
- */
-
- tvdlPtr->unloadProcPtr(tvdlPtr->loadHandle);
- }
-
- if (tvdlPtr->divertedFilesystem == NULL) {
- /*
- * Call the function for the native fileystem, which works even at this
- * late stage.
- */
-
- TclpDeleteFile(tvdlPtr->divertedFileNativeRep);
- NativeFreeInternalRep(tvdlPtr->divertedFileNativeRep);
- } else {
- /*
- * Remove the temporary file that was created. If encodings have
- * already been freed because the interpreter is exiting this may
- * crash.
- */
-
- if (tvdlPtr->divertedFilesystem->deleteFileProc(tvdlPtr->divertedFile)
- != TCL_OK) {
- /*
- * This may have happened because Tcl is exiting and encodings may
- * have already been deleted, or something else the filesystem
- * depends on may be gone.
- *
- * TO DO: Figure out how to delete this file more robustly, or
- * give the filesystem the information it needs to delete the file
- * more robustly. One problem might be that the filesystem cannot
- * extract the information it needs from the above pathname object
- * because Tcl's entire filesystem apparatus (the code in this
- * file) has been finalized and there is no way to get the native
- * handle of the file.
- */
- }
-
- /*
- * This also decrements the refCount of the Tcl_Filesystem
- * corresponding to this file. which might case filesystem to be freed
- * if Tcl is exiting.
- */
-
- Tcl_DecrRefCount(tvdlPtr->divertedFile);
- }
-
- ckfree(tvdlPtr);
-}
-
-/*
*---------------------------------------------------------------------------
*
* Tcl_FSLink --