summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2008-07-14 20:29:38 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2008-07-14 20:29:38 (GMT)
commit8fde7ec910e486d89ba49167d1b295a34197064c (patch)
treee7f19f81beecf18df1b4ed7a51f18c483da17797 /generic
parenta3a847f6fe873e569cc78f12befd9d14ae73d114 (diff)
downloadtcl-8fde7ec910e486d89ba49167d1b295a34197064c.zip
tcl-8fde7ec910e486d89ba49167d1b295a34197064c.tar.gz
tcl-8fde7ec910e486d89ba49167d1b295a34197064c.tar.bz2
* generic/tclParse.c: reverting the "fix" for [Bug 2017583],
* tests/parse.test: numLevel management and TclInterpReady check seems to be necessary after all.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclParse.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c
index 061f9eb..269978d 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclParse.c,v 1.69 2008/07/14 02:09:30 msofer Exp $
+ * RCS: @(#) $Id: tclParse.c,v 1.70 2008/07/14 20:29:40 msofer Exp $
*/
#include "tclInt.h"
@@ -2165,9 +2165,16 @@ TclSubstTokens(
break;
case TCL_TOKEN_COMMAND: {
+ Interp *iPtr = (Interp *) interp;
+
/* TIP #280: Transfer line information to nested command */
- code = TclEvalEx(interp, tokenPtr->start+1, tokenPtr->size-2,
- 0, line);
+ iPtr->numLevels++;
+ code = TclInterpReady(interp);
+ if (code == TCL_OK) {
+ code = TclEvalEx(interp, tokenPtr->start+1, tokenPtr->size-2,
+ 0, line);
+ }
+ iPtr->numLevels--;
appendObj = Tcl_GetObjResult(interp);
break;
}