diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2007-06-11 21:32:18 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2007-06-11 21:32:18 (GMT) |
commit | d9e02cd8466f31863647b26654c8a3995c566255 (patch) | |
tree | 62547a3a873705c43c53bd51a701376e010df0f5 /generic/tclNamesp.c | |
parent | 719ec9977020c58378f1b28a676c12a897149ea2 (diff) | |
download | tcl-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/tclNamesp.c')
-rw-r--r-- | generic/tclNamesp.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index df1f818..e717977 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -22,7 +22,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.136 2007/06/10 20:25:56 msofer Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.137 2007/06/11 21:32:19 msofer Exp $ */ #include "tclInt.h" @@ -2839,9 +2839,7 @@ TclGetNamespaceFromObj( name = TclGetString(objPtr); isFQ = ((*name == ':') && (*(name+1) == ':')); - refNsPtr = (Namespace *) (isFQ - ? TclGetGlobalNamespace(interp) - : TclGetCurrentNamespace(interp)); + refNsPtr = (Namespace *) (isFQ? NULL :TclGetCurrentNamespace(interp)); /* * Get the internal representation, converting to a namespace type if @@ -2860,7 +2858,7 @@ TclGetNamespaceFromObj( resPtr = (ResolvedNsName *) objPtr->internalRep.otherValuePtr; if ((objPtr->typePtr != &tclNsNameType) || (resPtr == NULL) - || (resPtr->refNsPtr != refNsPtr) + || (!isFQ && (resPtr->refNsPtr != refNsPtr)) || (nsPtr = resPtr->nsPtr, nsPtr->flags & NS_DEAD) || (resPtr->nsId != nsPtr->nsId)) { |