summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2004-10-31 16:43:27 (GMT)
committerdkf <dkf@noemail.net>2004-10-31 16:43:27 (GMT)
commit733179291e6ef447d60755aa7abd4fa9f5d15643 (patch)
tree6a344203c055c89c6bc0cb214b92128c1f8c2d60 /generic/tclCmdIL.c
parent8f7e1a0675ede90750414c5df521e433b006b921 (diff)
downloadtcl-733179291e6ef447d60755aa7abd4fa9f5d15643.zip
tcl-733179291e6ef447d60755aa7abd4fa9f5d15643.tar.gz
tcl-733179291e6ef447d60755aa7abd4fa9f5d15643.tar.bz2
Make [info globals ::foo] work. [Bug 1057461]
FossilOrigin-Name: ac9f2079e9908e9f76e6f8f4883e29ce92749e02
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index c692ce7..5951df7 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdIL.c,v 1.47.2.3 2004/10/14 15:28:38 dkf Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.47.2.4 2004/10/31 16:43:30 dkf Exp $
*/
#include "tclInt.h"
@@ -1082,7 +1082,15 @@ InfoGlobalsCmd(dummy, interp, objc, objv)
if (objc == 2) {
pattern = NULL;
} else if (objc == 3) {
- pattern = Tcl_GetString(objv[2]);
+ pattern = Tcl_GetString(objv[2]);
+ /*
+ * Strip leading global-namespace qualifiers. [Bug 1057461]
+ */
+ if (pattern[0] == ':' && pattern[1] == ':') {
+ while (*pattern == ':') {
+ pattern++;
+ }
+ }
} else {
Tcl_WrongNumArgs(interp, 2, objv, "?pattern?");
return TCL_ERROR;