summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclIOUtil.c85
-rw-r--r--generic/tclInt.h1
2 files changed, 0 insertions, 86 deletions
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 04c886c..1c36989 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -3610,91 +3610,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);
- }
-
- Tcl_Free(tvdlPtr);
-}
-
-/*
*---------------------------------------------------------------------------
*
* Tcl_FSLink --
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 7720981..6702825 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -3322,7 +3322,6 @@ MODULE_SCOPE Tcl_Command TclNRCreateCommandInNs(Tcl_Interp *interp,
void *clientData, Tcl_CmdDeleteProc *deleteProc);
MODULE_SCOPE int TclNREvalFile(Tcl_Interp *interp, Tcl_Obj *pathPtr,
const char *encodingName);
-MODULE_SCOPE void TclFSUnloadTempFile(Tcl_LoadHandle loadHandle);
MODULE_SCOPE int * TclGetAsyncReadyPtr(void);
MODULE_SCOPE Tcl_Obj * TclGetBgErrorHandler(Tcl_Interp *interp);
MODULE_SCOPE int TclGetChannelFromObj(Tcl_Interp *interp,