summaryrefslogtreecommitdiffstats
path: root/generic/tclPkg.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-03-02 16:00:19 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-03-02 16:00:19 (GMT)
commit6dc1f8021ed597b13289a02c41c2e9660525a81a (patch)
tree54877f6753e15ace22e9329ff6b339b965192fc3 /generic/tclPkg.c
parentb788457ad48d5cc34b431418f7d076d83f78b5ff (diff)
downloadtcl-6dc1f8021ed597b13289a02c41c2e9660525a81a.zip
tcl-6dc1f8021ed597b13289a02c41c2e9660525a81a.tar.gz
tcl-6dc1f8021ed597b13289a02c41c2e9660525a81a.tar.bz2
Use TIP #613's Tcl_GetIndexFromObj() to eliminate typecasts which are no longer necessary
Diffstat (limited to 'generic/tclPkg.c')
-rw-r--r--generic/tclPkg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index a5708da..157ccec 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -1077,9 +1077,9 @@ TclNRPackageObjCmd(
PKG_FILES, PKG_FORGET, PKG_IFNEEDED, PKG_NAMES, PKG_PREFER,
PKG_PRESENT, PKG_PROVIDE, PKG_REQUIRE, PKG_UNKNOWN, PKG_VCOMPARE,
PKG_VERSIONS, PKG_VSATISFIES
- };
+ } optionIndex;
Interp *iPtr = (Interp *) interp;
- int optionIndex, exact, i, newobjc, satisfies;
+ int exact, i, newobjc, satisfies;
PkgAvail *availPtr, *prevPtr;
Package *pkgPtr;
Tcl_HashEntry *hPtr;
@@ -1099,7 +1099,7 @@ TclNRPackageObjCmd(
&optionIndex) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum pkgOptionsEnum) optionIndex) {
+ switch (optionIndex) {
case PKG_FILES: {
PkgFiles *pkgFiles;