diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2006-10-23 21:36:54 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2006-10-23 21:36:54 (GMT) |
commit | 00a65742087d6d3b1aca1c8153ba4d16b169ee27 (patch) | |
tree | 3333dae28c1795f39b85a6647ffc38ca89c7e9b1 /generic/tclObj.c | |
parent | a45dac076ba36370d50f550d483af81d54f88513 (diff) | |
download | tcl-00a65742087d6d3b1aca1c8153ba4d16b169ee27.zip tcl-00a65742087d6d3b1aca1c8153ba4d16b169ee27.tar.gz tcl-00a65742087d6d3b1aca1c8153ba4d16b169ee27.tar.bz2 |
* generic/tcl.h: Modified the Tcl call stack so
* generic/tclBasic.c: there is always a valid CallFrame, even
* generic/tclCmdIL.c: at level 0 [Patch 1577278]. Most of the
* generic/tclInt.h: changes involve removing tests for
* generic/tclNamesp.c: iPtr->(var)framePtr==NULL. There is now a
* generic/tclObj.c: CallFrame pushed at interp creation
* generic/tclProc.c: with a pointer to it stored in
* generic/tclTrace.c: iPtr->rootFramePtr. A second unused
* generic/tclVar.c: field in Interp is hijacked to enable
further functionality, currently unused (but with several FRQs
depending on it).
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r-- | generic/tclObj.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c index eb77e35..3b2658d 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.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: tclObj.c,v 1.113 2006/09/30 19:00:13 msofer Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.114 2006/10/23 21:36:55 msofer Exp $ */ #include "tclInt.h" @@ -3485,7 +3485,7 @@ Tcl_GetCommandFromObj( savedFramePtr = iPtr->varFramePtr; name = Tcl_GetString(objPtr); if ((*name++ == ':') && (*name == ':')) { - iPtr->varFramePtr = NULL; + iPtr->varFramePtr = iPtr->rootFramePtr; } /* @@ -3507,11 +3507,7 @@ Tcl_GetCommandFromObj( * Get the current namespace. */ - if (iPtr->varFramePtr != NULL) { - currNsPtr = iPtr->varFramePtr->nsPtr; - } else { - currNsPtr = iPtr->globalNsPtr; - } + currNsPtr = iPtr->varFramePtr->nsPtr; /* * Check the context namespace and the namespace epoch of the resolved @@ -3599,18 +3595,14 @@ TclSetCmdNameObj( savedFramePtr = iPtr->varFramePtr; name = Tcl_GetString(objPtr); if ((*name++ == ':') && (*name == ':')) { - iPtr->varFramePtr = NULL; + iPtr->varFramePtr = iPtr->rootFramePtr; } /* * Get the current namespace. */ - if (iPtr->varFramePtr != NULL) { - currNsPtr = iPtr->varFramePtr->nsPtr; - } else { - currNsPtr = iPtr->globalNsPtr; - } + currNsPtr = iPtr->varFramePtr->nsPtr; cmdPtr->refCount++; resPtr = (ResolvedCmdName *) ckalloc(sizeof(ResolvedCmdName)); @@ -3772,11 +3764,7 @@ SetCmdNameFromAny( * Get the current namespace. */ - if (iPtr->varFramePtr != NULL) { - currNsPtr = iPtr->varFramePtr->nsPtr; - } else { - currNsPtr = iPtr->globalNsPtr; - } + currNsPtr = iPtr->varFramePtr->nsPtr; cmdPtr->refCount++; resPtr = (ResolvedCmdName *) ckalloc(sizeof(ResolvedCmdName)); |