diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2004-05-04 02:38:06 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2004-05-04 02:38:06 (GMT) |
commit | e2d0d91fa792e2f97a832e3b025c543dfbddf697 (patch) | |
tree | 12ae5ffaaf42c5becce49c9e9ac09deafb8d361a | |
parent | 0f128ef98cf49bba53ea19526bfb547cefbf4554 (diff) | |
download | tcl-e2d0d91fa792e2f97a832e3b025c543dfbddf697.zip tcl-e2d0d91fa792e2f97a832e3b025c543dfbddf697.tar.gz tcl-e2d0d91fa792e2f97a832e3b025c543dfbddf697.tar.bz2 |
* generic/tclCompile.c (TclCompileScript): setting the compilation
namespace outside of the loop.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tclCompile.c | 14 |
2 files changed, 12 insertions, 7 deletions
@@ -1,5 +1,10 @@ 2004-05-03 Miguel Sofer <msofer@users.sf.net> + * generic/tclCompile.c (TclCompileScript): setting the compilation + namespace outside of the loop. + +2004-05-03 Miguel Sofer <msofer@users.sf.net> + * generic/tclCompile.c: * generic/tclInt.h: reverted fix for [Bug 926445] of 2004-04-02, restoring TCL_ALIGN to the header file. Todd Helfter reported that diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 97e7126..52c3487 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.62 2004/05/03 19:59:17 msofer Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.63 2004/05/04 02:38:07 msofer Exp $ */ #include "tclInt.h" @@ -1001,6 +1001,12 @@ TclCompileScript(interp, script, numBytes, envPtr) EnterCmdStartData(envPtr, currCmdIndex, (parse.commandStart - envPtr->source), startCodeOffset); + if (envPtr->procPtr != NULL) { + cmdNsPtr = envPtr->procPtr->cmdPtr->nsPtr; + } else { + cmdNsPtr = NULL; /* use current NS */ + } + /* * Each iteration of the following loop compiles one word * from the command. @@ -1029,12 +1035,6 @@ TclCompileScript(interp, script, numBytes, envPtr) */ if ((wordIdx == 0) && !expand) { - if (envPtr->procPtr != NULL) { - cmdNsPtr = envPtr->procPtr->cmdPtr->nsPtr; - } else { - cmdNsPtr = NULL; /* use current NS */ - } - /* * We copy the string before trying to find the command * by name. We used to modify the string in place, but |