From e09eccf1c109d772ea755d25d028353093bbfa44 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 27 Oct 2007 18:03:07 +0000 Subject: * generic/tclNamesp.c (Tcl_FindCommand): insure that FQ command names are searched from the global namespace, ie, bypassing resolvers of the current namespace [Bug 1114355]. --- ChangeLog | 4 ++++ generic/tclNamesp.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1f578ce..0dbc7f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ 2007-10-27 Miguel Sofer + * generic/tclNamesp.c (Tcl_FindCommand): insure that FQ command + names are searched from the global namespace, ie, bypassing + resolvers of the current namespace [Bug 1114355]. + * doc/apply.n: fixed example [Bug 1811791] * doc/namespace.n: improved example [Bug 1788984] * doc/AddErrInfo.3: typo [Bug 1715087] diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 65a6952..430eb49 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,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.150 2007/09/17 10:44:04 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.151 2007/10/27 18:03:08 msofer Exp $ */ #include "tclInt.h" @@ -2371,7 +2371,7 @@ Tcl_FindCommand( * signal an error. */ - if (flags & TCL_GLOBAL_ONLY) { + if ((flags & TCL_GLOBAL_ONLY) || !strncmp(name, "::", 2)) { cxtNsPtr = (Namespace *) TclGetGlobalNamespace(interp); } else if (contextNsPtr != NULL) { cxtNsPtr = (Namespace *) contextNsPtr; -- cgit v0.12