summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2024-05-13 10:34:11 (GMT)
committersebres <sebres@users.sourceforge.net>2024-05-13 10:34:11 (GMT)
commitb83d6a5872adddeaa81bc9fa31aafed0e72c85e1 (patch)
treee701a2d81e38ab7f654efbcc6976e3028852ec25
parent5ef9acf4bc1cfe8190fd7eab0eaedb217d4918e6 (diff)
downloadtcl-b83d6a5872adddeaa81bc9fa31aafed0e72c85e1.zip
tcl-b83d6a5872adddeaa81bc9fa31aafed0e72c85e1.tar.gz
tcl-b83d6a5872adddeaa81bc9fa31aafed0e72c85e1.tar.bz2
interim fix for [9889f96f4da77e3b]: avoid lazy creation and compilation for clock-ensemble (unless the issue with line-number reset by recompile is solved)
-rw-r--r--library/init.tcl8
1 files changed, 3 insertions, 5 deletions
diff --git a/library/init.tcl b/library/init.tcl
index f5d762c..da43bd4 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -101,17 +101,15 @@ if {[interp issafe]} {
# Set up the 'clock' ensemble
- proc clock args {
+ apply {{} {
set cmdmap [dict create]
foreach cmd {add clicks format microseconds milliseconds scan seconds} {
dict set cmdmap $cmd ::tcl::clock::$cmd
}
namespace inscope ::tcl::clock [list namespace ensemble create -command \
- [uplevel 1 [list ::namespace origin [::lindex [info level 0] 0]]] \
- -map $cmdmap]
+ ::clock -map $cmdmap]
::tcl::unsupported::clock::configure -init-complete
- uplevel 1 [info level 0]
- }
+ }}
}
# Conditionalize for presence of exec.