From b83d6a5872adddeaa81bc9fa31aafed0e72c85e1 Mon Sep 17 00:00:00 2001 From: sebres Date: Mon, 13 May 2024 10:34:11 +0000 Subject: interim fix for [9889f96f4da77e3b]: avoid lazy creation and compilation for clock-ensemble (unless the issue with line-number reset by recompile is solved) --- library/init.tcl | 8 +++----- 1 file 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. -- cgit v0.12