summaryrefslogtreecommitdiffstats
path: root/generic/tclLoad.c
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2024-05-24 16:05:19 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2024-05-24 16:05:19 (GMT)
commitb7eeffcdef4802086b4f43db1619b2784d74aa79 (patch)
tree0e5d90abdf8a9e69a0fc4383d8ceac9d115a02c4 /generic/tclLoad.c
parent14145609e7b52c939ce5bc328b87b8ab02c7a431 (diff)
parentb230de2a4d3e8748a542c21d0dfde9e357ac0b0a (diff)
downloadtcl-b7eeffcdef4802086b4f43db1619b2784d74aa79.zip
tcl-b7eeffcdef4802086b4f43db1619b2784d74aa79.tar.gz
tcl-b7eeffcdef4802086b4f43db1619b2784d74aa79.tar.bz2
Merge trunk
Diffstat (limited to 'generic/tclLoad.c')
-rw-r--r--generic/tclLoad.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/generic/tclLoad.c b/generic/tclLoad.c
index d7c13d1..c5a181d 100644
--- a/generic/tclLoad.c
+++ b/generic/tclLoad.c
@@ -12,7 +12,6 @@
#include "tclInt.h"
-
/*
* The following structure describes a library that has been loaded either
* dynamically (with the "load" command) or statically (as indicated by a call
@@ -96,7 +95,6 @@ static int IsStatic(LoadedLibrary *libraryPtr);
static int UnloadLibrary(Tcl_Interp *interp, Tcl_Interp *target,
LoadedLibrary *library, int keepLibrary,
const char *fullFileName, int interpExiting);
-
static int
IsStatic(
@@ -144,7 +142,7 @@ Tcl_LoadObjCmd(
int flags = 0;
Tcl_Obj *const *savedobjv = objv;
static const char *const options[] = {
- "-global", "-lazy", "--", NULL
+ "-global", "-lazy", "--", NULL
};
enum loadOptionsEnum {
LOAD_GLOBAL, LOAD_LAZY, LOAD_LAST
@@ -168,7 +166,8 @@ Tcl_LoadObjCmd(
}
}
if ((objc < 2) || (objc > 4)) {
- Tcl_WrongNumArgs(interp, 1, savedobjv, "?-global? ?-lazy? ?--? fileName ?prefix? ?interp?");
+ Tcl_WrongNumArgs(interp, 1, savedobjv,
+ "?-global? ?-lazy? ?--? fileName ?prefix? ?interp?");
return TCL_ERROR;
}
if (Tcl_FSConvertToPathType(interp, objv[1]) != TCL_OK) {
@@ -753,7 +752,6 @@ Tcl_UnloadObjCmd(
}
return code;
}
-
/*
*----------------------------------------------------------------------
@@ -773,13 +771,12 @@ Tcl_UnloadObjCmd(
*/
static int
UnloadLibrary(
- Tcl_Interp *interp,
- Tcl_Interp *target,
- LoadedLibrary *libraryPtr,
- int keepLibrary,
- const char *fullFileName,
- int interpExiting
-)
+ Tcl_Interp *interp,
+ Tcl_Interp *target,
+ LoadedLibrary *libraryPtr,
+ int keepLibrary,
+ const char *fullFileName,
+ int interpExiting)
{
int code;
InterpLibrary *ipFirstPtr, *ipPtr;
@@ -821,8 +818,6 @@ UnloadLibrary(
unloadProc = libraryPtr->unloadProc;
}
-
-
/*
* We are ready to unload the library. First, evaluate the unload
* function. If this fails, we cannot proceed with unload. Also, we must
@@ -856,13 +851,11 @@ UnloadLibrary(
code = unloadProc(target, code);
}
-
if (code != TCL_OK) {
Tcl_TransferResult(target, code, interp);
goto done;
}
-
/*
* Remove this library from the interpreter's library cache.
*/
@@ -885,7 +878,6 @@ UnloadLibrary(
Tcl_Free(ipPtr);
Tcl_SetAssocData(target, "tclLoad", LoadCleanupProc, ipFirstPtr);
-
if (IsStatic(libraryPtr)) {
goto done;
}
@@ -1107,9 +1099,8 @@ TclGetLoadedLibraries(
* NULL, return info about all interps;
* otherwise, just return info about this
* interpreter. */
- const char *prefix) /* Prefix or NULL. If NULL, return info
- * for all prefixes.
- */
+ const char *prefix) /* Prefix or NULL. If NULL, return info
+ * for all prefixes. */
{
Tcl_Interp *target;
LoadedLibrary *libraryPtr;