summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-05-24 20:39:25 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-05-24 20:39:25 (GMT)
commit13a6722593334f23786c8c20f446a8027a8ebe6c (patch)
treea483b3cff11bacdd2ecd1c20dd41cc0dbb5dbf87
parent55a0957a84fa30d7881c6ed4ca5d10d9760aa6c1 (diff)
downloadtcl-13a6722593334f23786c8c20f446a8027a8ebe6c.zip
tcl-13a6722593334f23786c8c20f446a8027a8ebe6c.tar.gz
tcl-13a6722593334f23786c8c20f446a8027a8ebe6c.tar.bz2
Adapt and tidy up the bug fix.
-rw-r--r--generic/tclEnsemble.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c
index e37ad1a..1c91734 100644
--- a/generic/tclEnsemble.c
+++ b/generic/tclEnsemble.c
@@ -1832,7 +1832,6 @@ NsEnsembleImplementationCmdNR(
Tcl_Obj *copyPtr; /* The actual list of words to dispatch to.
* Will be freed by the dispatch engine. */
int prefixObjc, copyObjc;
- Interp *iPtr = (Interp *) interp;
/*
* Get the prefix that we're rewriting to. To do this we need to
@@ -1876,40 +1875,12 @@ NsEnsembleImplementationCmdNR(
* count both as inserted and removed arguments.
*/
-#if 1
if (TclInitRewriteEnsemble(interp, 2 + ensemblePtr->numParameters,
prefixObjc + ensemblePtr->numParameters, objv)) {
TclNRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL,
NULL);
}
-#else
-
- if (iPtr->ensembleRewrite.sourceObjs == NULL) {
- iPtr->ensembleRewrite.sourceObjs = objv;
- iPtr->ensembleRewrite.numRemovedObjs =
- 2 + ensemblePtr->numParameters;
- iPtr->ensembleRewrite.numInsertedObjs =
- prefixObjc + ensemblePtr->numParameters;
- TclNRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL,
- NULL);
- } else {
- register int ni = 2 + ensemblePtr->numParameters
- - iPtr->ensembleRewrite.numInsertedObjs;
- /* Position in objv of new front of insertion
- * relative to old one. */
- if (ni > 0) {
-//fprintf(stdout, "COVER\n"); fflush(stdout);
- iPtr->ensembleRewrite.numRemovedObjs += ni;
- iPtr->ensembleRewrite.numInsertedObjs
- = prefixObjc + ensemblePtr->numParameters;
- } else {
- iPtr->ensembleRewrite.numInsertedObjs += prefixObjc-2;
- }
- }
-
-#endif
-
/*
* Hand off to the target command.
*/
@@ -2018,18 +1989,13 @@ TclInitRewriteEnsemble(
int isRootEnsemble = (iPtr->ensembleRewrite.sourceObjs == NULL);
if (isRootEnsemble) {
-//fprintf(stdout, "SET-SOURCE: '%s'\n", Tcl_GetString(objv[0])); fflush(stdout);
iPtr->ensembleRewrite.sourceObjs = objv;
iPtr->ensembleRewrite.numRemovedObjs = numRemoved;
iPtr->ensembleRewrite.numInsertedObjs = numInserted;
} else {
int numIns = iPtr->ensembleRewrite.numInsertedObjs;
-//fprintf(stdout, "Pre-SOURCE: '%s'\n",
-//Tcl_GetString(iPtr->ensembleRewrite.sourceObjs[0])); fflush(stdout);
-
if (numIns < numRemoved) {
-//fprintf(stdout, "COVER2\n"); fflush(stdout);
iPtr->ensembleRewrite.numRemovedObjs += numRemoved - numIns;
iPtr->ensembleRewrite.numInsertedObjs = numInserted;
} else {