summaryrefslogtreecommitdiffstats
path: root/generic/tclEnsemble.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-05-24 19:29:58 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-05-24 19:29:58 (GMT)
commitc0771697239c868133d1f53442b91259ab58cf25 (patch)
tree48e230c3cc80dcd82a5a96dcdc1ca92e47a224fb /generic/tclEnsemble.c
parentca66ff4b66c7c2c37cf104ead999ae2fc8c85747 (diff)
downloadtcl-c0771697239c868133d1f53442b91259ab58cf25.zip
tcl-c0771697239c868133d1f53442b91259ab58cf25.tar.gz
tcl-c0771697239c868133d1f53442b91259ab58cf25.tar.bz2
The handling of ensemble rewriting here is not right, but I've not yet
found the test case to demonstrate it. Checking in debugging code to spread to other dev platforms.
Diffstat (limited to 'generic/tclEnsemble.c')
-rw-r--r--generic/tclEnsemble.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c
index 986a553..c947459 100644
--- a/generic/tclEnsemble.c
+++ b/generic/tclEnsemble.c
@@ -12,6 +12,7 @@
#include "tclInt.h"
#include "tclCompile.h"
+#include "assert.h"
/*
* Declarations for functions local to this file:
@@ -1891,6 +1892,12 @@ NsEnsembleImplementationCmdNR(
* relative to old one. */
if (ni > 0) {
iPtr->ensembleRewrite.numRemovedObjs += ni;
+fprintf(stdout, "%d == %d\n",
+iPtr->ensembleRewrite.numInsertedObjs - 1,
+ensemblePtr->numParameters);
+fflush(stdout);
+assert(iPtr->ensembleRewrite.numInsertedObjs - 1 == ensemblePtr->numParameters);
+
iPtr->ensembleRewrite.numInsertedObjs += prefixObjc-1;
} else {
iPtr->ensembleRewrite.numInsertedObjs += prefixObjc-2;