summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-06-11 21:32:18 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-06-11 21:32:18 (GMT)
commitd9e02cd8466f31863647b26654c8a3995c566255 (patch)
tree62547a3a873705c43c53bd51a701376e010df0f5 /generic/tclObj.c
parent719ec9977020c58378f1b28a676c12a897149ea2 (diff)
downloadtcl-d9e02cd8466f31863647b26654c8a3995c566255.zip
tcl-d9e02cd8466f31863647b26654c8a3995c566255.tar.gz
tcl-d9e02cd8466f31863647b26654c8a3995c566255.tar.bz2
* generic/tclNamesp.c: tweaks to Tcl_GetCommandFromObj and
* generic/tclObj.c: TclGetNamespaceFromObj
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r--generic/tclObj.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 53dff2f..e250614 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.125 2007/06/10 20:25:56 msofer Exp $
+ * RCS: @(#) $Id: tclObj.c,v 1.126 2007/06/11 21:32:19 msofer Exp $
*/
#include "tclInt.h"
@@ -3478,9 +3478,8 @@ Tcl_GetCommandFromObj(
name = TclGetString(objPtr);
isFQ = ((*name++ == ':') && (*name == ':'));
- refNsPtr = (Namespace *) (isFQ
- ? TclGetGlobalNamespace(interp)
- : TclGetCurrentNamespace(interp));
+ refNsPtr = (Namespace *) (isFQ? NULL :TclGetCurrentNamespace(interp));
+
/*
* Get the internal representation, converting to a command type if
@@ -3503,11 +3502,13 @@ Tcl_GetCommandFromObj(
resPtr = (ResolvedCmdName *) objPtr->internalRep.twoPtrValue.ptr1;
if ((objPtr->typePtr != &tclCmdNameType)
|| (resPtr == NULL)
- || (resPtr->refNsPtr != refNsPtr)
- || (resPtr->refNsId != refNsPtr->nsId)
- || (resPtr->refNsCmdEpoch != refNsPtr->cmdRefEpoch)
|| (cmdPtr = resPtr->cmdPtr, cmdPtr->cmdEpoch != resPtr->cmdEpoch)
- || (cmdPtr->flags & CMD_IS_DELETED)) {
+ || (cmdPtr->flags & CMD_IS_DELETED)
+ || ( !isFQ &&
+ ((resPtr->refNsPtr != refNsPtr)
+ || (resPtr->refNsId != refNsPtr->nsId)
+ || (resPtr->refNsCmdEpoch != refNsPtr->cmdRefEpoch)))
+ ) {
if (isFQ) {
refNsPtr = (Namespace *) TclGetCurrentNamespace(interp);