summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r--generic/tclCmdMZ.c28
1 files changed, 3 insertions, 25 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index fbc9d8f..23e6bd1 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -989,11 +989,8 @@ TclNRSourceObjCmd(
{
const char *encodingName = NULL;
Tcl_Obj *fileName;
- int result;
- void **pkgFiles = NULL;
- void *names = NULL;
- if (objc < 2 || objc > 4) {
+ if (objc != 2 && objc !=4) {
Tcl_WrongNumArgs(interp, 1, objv, "?-encoding name? fileName");
return TCL_ERROR;
}
@@ -1011,28 +1008,9 @@ TclNRSourceObjCmd(
return TCL_ERROR;
}
encodingName = TclGetString(objv[2]);
- } else if (objc == 3) {
- static const char *const nopkgoptions[] = {
- "-nopkg", NULL
- };
- int index;
-
- if (TCL_ERROR == Tcl_GetIndexFromObj(interp, objv[1], nopkgoptions,
- "option", TCL_EXACT, &index)) {
- return TCL_ERROR;
- }
- pkgFiles = Tcl_GetAssocData(interp, "tclPkgFiles", NULL);
- /* Make sure that during the following TclNREvalFile no filenames
- * are recorded for inclusion in the "package files" command */
- names = *pkgFiles;
- *pkgFiles = NULL;
- }
- result = TclNREvalFile(interp, fileName, encodingName);
- if (pkgFiles) {
- /* restore "tclPkgFiles" assocdata to how it was. */
- *pkgFiles = names;
}
- return result;
+
+ return TclNREvalFile(interp, fileName, encodingName);
}
/*