summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorkennykb <kennykb@noemail.net>2008-11-30 19:23:59 (GMT)
committerkennykb <kennykb@noemail.net>2008-11-30 19:23:59 (GMT)
commitd6546da867b89e719221c437feceff51e5caafc9 (patch)
tree60482ecd9fee645d9218ac4b32eab419842a8468 /library
parent868eef9e2b6e5529949a86a851fd68a1fdbdb22d (diff)
downloadtcl-d6546da867b89e719221c437feceff51e5caafc9.zip
tcl-d6546da867b89e719221c437feceff51e5caafc9.tar.gz
tcl-d6546da867b89e719221c437feceff51e5caafc9.tar.bz2
* library/clock.tcl (format, ParseClockScanFormat): Added a
[string map] to get rid of namespace delimiters before caching a scan or format procedure [Bug 2362156]. * tests/clock.test (clock-64.[12]): Added test cases for the bug that was tickled by a namespace delimiter inside a format string. FossilOrigin-Name: f50581ec5480de80a62151c0d322a065426dc96b
Diffstat (limited to 'library')
-rw-r--r--library/clock.tcl8
1 files changed, 5 insertions, 3 deletions
diff --git a/library/clock.tcl b/library/clock.tcl
index 75edb1c..e4a21e3 100644
--- a/library/clock.tcl
+++ b/library/clock.tcl
@@ -13,7 +13,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: clock.tcl,v 1.48 2008/11/01 15:03:28 das Exp $
+# RCS: @(#) $Id: clock.tcl,v 1.49 2008/11/30 19:24:00 kennykb Exp $
#
#----------------------------------------------------------------------
@@ -687,7 +687,8 @@ proc ::tcl::clock::format { args } {
# name in the 'FormatProc' array to avoid losing its internal
# representation, which contains the name resolution.
- set procName ::tcl::clock::formatproc'$format'$locale
+ set procName formatproc'$format'$locale
+ set procName [namespace current]::[string map {: {\:} \\ {\\}} $procName]
if {[info exists FormatProc($procName)]} {
set procName $FormatProc($procName)
} else {
@@ -1531,7 +1532,8 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} {
# Check whether the format has been parsed previously, and return
# the existing recognizer if it has.
- set procName [namespace current]::scanproc'$formatString'$locale
+ set procName scanproc'$formatString'$locale
+ set procName [namespace current]::[string map {: {\:} \\ {\\}} $procName]
if { [namespace which $procName] != {} } {
return $procName
}