summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-10-27 18:03:07 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-10-27 18:03:07 (GMT)
commite09eccf1c109d772ea755d25d028353093bbfa44 (patch)
tree4f473a2aaebf7b5691fb65906eb5348ec3009b17
parent8459ce7f878f92ca25f42843cfeff4e5556ea73f (diff)
downloadtcl-e09eccf1c109d772ea755d25d028353093bbfa44.zip
tcl-e09eccf1c109d772ea755d25d028353093bbfa44.tar.gz
tcl-e09eccf1c109d772ea755d25d028353093bbfa44.tar.bz2
* 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].
-rw-r--r--ChangeLog4
-rw-r--r--generic/tclNamesp.c4
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 <msofer@users.sf.net>
+ * 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;