diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-08-23 12:12:52 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-08-23 12:12:52 (GMT) |
commit | 3fcdcb78b8886afa6230579b2d3f3cc7a0cf95ec (patch) | |
tree | 7d9e003bf32ea9365e9845494ba25c58d4aad1b2 | |
parent | 1312c312163d09602722dee3d4fc1797fb497209 (diff) | |
download | tcl-3fcdcb78b8886afa6230579b2d3f3cc7a0cf95ec.zip tcl-3fcdcb78b8886afa6230579b2d3f3cc7a0cf95ec.tar.gz tcl-3fcdcb78b8886afa6230579b2d3f3cc7a0cf95ec.tar.bz2 |
Documentation/comment fixes [dcc8645349]
-rw-r--r-- | doc/info.n | 8 | ||||
-rw-r--r-- | generic/tclCmdIL.c | 10 | ||||
-rw-r--r-- | generic/tclInt.h | 2 | ||||
-rw-r--r-- | tests/info.test | 2 |
4 files changed, 11 insertions, 11 deletions
@@ -282,11 +282,11 @@ Returns the value of \fBtcl_library\fR, which is the name of the library directory in which the scripts distributed with Tcl scripts are stored. .\" METHOD: loaded .TP -\fBinfo loaded \fR?\fIinterp\fR? ?\fIpackage\fR? +\fBinfo loaded \fR?\fIinterp\fR? ?\fIprefix\fR? . -Returns the name of each file loaded in \fIinterp\fR va \fBload\fR as part of -\fIpackage\fR . If \fIpackage\fR is not given, returns a list where each item -is the name of the loaded file and the name of the package for which the file +Returns the name of each file loaded in \fIinterp\fR by the \fBload\fR +with prefix \fIprefix\fR . If \fIprefix\fR is not given, returns a list where each item +is the name of the loaded file and the prefix for which the file was loaded. For a statically-loaded package the name of the file is the empty string. For \fIinterp\fR, the empty string is the current interpreter. .\" METHOD: locals diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 3742ba9..8c1c162 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -1706,10 +1706,10 @@ InfoLoadedCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - const char *interpName, *packageName; + const char *interpName, *prefix; if (objc > 3) { - Tcl_WrongNumArgs(interp, 1, objv, "?interp? ?packageName?"); + Tcl_WrongNumArgs(interp, 1, objv, "?interp? ?prefix?"); return TCL_ERROR; } @@ -1719,11 +1719,11 @@ InfoLoadedCmd( interpName = TclGetString(objv[1]); } if (objc < 3) { /* Get loaded files in all packages. */ - packageName = NULL; + prefix = NULL; } else { /* Get pkgs just in specified interp. */ - packageName = TclGetString(objv[2]); + prefix = TclGetString(objv[2]); } - return TclGetLoadedLibraries(interp, interpName, packageName); + return TclGetLoadedLibraries(interp, interpName, prefix); } /* diff --git a/generic/tclInt.h b/generic/tclInt.h index 7cbb3f1..4966481 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -3439,7 +3439,7 @@ MODULE_SCOPE char * TclGetStringStorage(Tcl_Obj *objPtr, Tcl_Size *sizePtr); MODULE_SCOPE int TclGetLoadedLibraries(Tcl_Interp *interp, const char *targetName, - const char *packageName); + const char *prefix); MODULE_SCOPE int TclGetWideBitsFromObj(Tcl_Interp *, Tcl_Obj *, Tcl_WideInt *); MODULE_SCOPE int TclCompareStringKeys(void *keyPtr, Tcl_HashEntry *hPtr); diff --git a/tests/info.test b/tests/info.test index fe7b35b..b3232da 100644 --- a/tests/info.test +++ b/tests/info.test @@ -398,7 +398,7 @@ set tcl_library $savedLibrary; unset savedLibrary test info-11.1 {info loaded option} -body { info loaded a b c -} -returnCodes error -result {wrong # args: should be "info loaded ?interp? ?packageName?"} +} -returnCodes error -result {wrong # args: should be "info loaded ?interp? ?prefix?"} test info-11.2 {info loaded option} -body { info loaded {}; info loaded gorp } -returnCodes error -result {could not find interpreter "gorp"} |