summaryrefslogtreecommitdiffstats
path: root/generic/tclParse.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-03-18 15:50:56 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-03-18 15:50:56 (GMT)
commit1602b42886546fdee649c4be434cb8520e255248 (patch)
tree1b3e83defa340cf74ce336ffb668012adebdcc4c /generic/tclParse.c
parentf7bd42abc0c6952dae468911161f6dd0dc01f913 (diff)
downloadtcl-1602b42886546fdee649c4be434cb8520e255248.zip
tcl-1602b42886546fdee649c4be434cb8520e255248.tar.gz
tcl-1602b42886546fdee649c4be434cb8520e255248.tar.bz2
* generic/tclBasic.c (Tcl_EvalEx): Restored recursion limit
* generic/tclParse.c (TclSubstTokens): testing in nested command * tests/basic.test (basic-46.4): substitutions within direct * tests/parse.test (parse-19.*): script evaluation (Tcl_EvalEx) that got lost in the parser reforms of Tcl 8.1. Added tests for correct behavior. [Bug 1115904]
Diffstat (limited to 'generic/tclParse.c')
-rw-r--r--generic/tclParse.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c
index 09894bc..10eabdd 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -13,7 +13,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.39 2004/10/26 21:52:37 dgp Exp $
+ * RCS: @(#) $Id: tclParse.c,v 1.40 2005/03/18 15:51:00 dgp Exp $
*/
#include "tclInt.h"
@@ -2001,11 +2001,18 @@ TclSubstTokens(interp, tokenPtr, count, tokensLeftPtr)
break;
}
- case TCL_TOKEN_COMMAND:
- code = Tcl_EvalEx(interp, tokenPtr->start+1, tokenPtr->size-2,
- 0);
+ case TCL_TOKEN_COMMAND: {
+ Interp *iPtr = (Interp *) interp;
+ iPtr->numLevels++;
+ code = TclInterpReady(interp);
+ if (code == TCL_OK) {
+ code = Tcl_EvalEx(interp,
+ tokenPtr->start+1, tokenPtr->size-2, 0);
+ }
+ iPtr->numLevels--;
appendObj = Tcl_GetObjResult(interp);
break;
+ }
case TCL_TOKEN_VARIABLE: {
Tcl_Obj *arrayIndex = NULL;