diff options
author | andreas_kupries <andreas_kupries@noemail.net> | 2008-07-23 20:45:08 (GMT) |
---|---|---|
committer | andreas_kupries <andreas_kupries@noemail.net> | 2008-07-23 20:45:08 (GMT) |
commit | 9da93e44ec8ed930ee9126f93d9603cd7c281646 (patch) | |
tree | 350e642622f701d7e7996cdc4cb1ac86d4ee4ffd /generic/tclCompile.c | |
parent | 46c7302207cebc34115d758d417fab6826bb9e92 (diff) | |
download | tcl-9da93e44ec8ed930ee9126f93d9603cd7c281646.zip tcl-9da93e44ec8ed930ee9126f93d9603cd7c281646.tar.gz tcl-9da93e44ec8ed930ee9126f93d9603cd7c281646.tar.bz2 |
* generic/tclBasic.c: Modified TclArgumentGet to reject pure lists
* generic/tclCmdIL.c: immediately, without search. Reworked setup
* generic/tclCompile.c: of eoFramePtr, doesn't need the line
* tests/info.test: information, more sensible to have everything
on line 1 when eval'ing a pure list. Updated the users of the line
information to special case this based on the frame type (i.e.
TCL_LOCATION_EVAL_LIST). Added a testcase demonstrating the new
behaviour.
FossilOrigin-Name: 4ad027ecef469153905de182fbd135e85d0f70fa
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r-- | generic/tclCompile.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c index a49297c..59be33a 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.43.2.11 2008/07/22 22:30:05 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.43.2.12 2008/07/23 20:45:18 andreas_kupries Exp $ */ #include "tclInt.h" @@ -818,8 +818,12 @@ TclInitCompileEnv(interp, envPtr, string, numBytes, invoker, word) envPtr->extCmdMapPtr->neiloc = 0; envPtr->extCmdMapPtr->nueiloc = 0; - if (invoker == NULL) { - /* Initialize the compiler for relative counting */ + if (invoker == NULL || + (invoker->type == TCL_LOCATION_EVAL_LIST)) { + /* + * Initialize the compiler for relative counting in case of a + * dynamic context. + */ envPtr->line = 1; envPtr->extCmdMapPtr->type = (envPtr->procPtr |