diff options
author | Kevin B Kenny <kennykb@acm.org> | 2017-03-14 22:22:40 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2017-03-14 22:22:40 (GMT) |
commit | bbf9191cdf2558bb4e7571a1cf57886d79826c7e (patch) | |
tree | 7060222536c985bc82a9689d4b8dae9a3e23df03 /library | |
parent | 084c8b2259399cfa7c22283d77abb1820207afad (diff) | |
parent | cd42f659661ae1b0035564950db6299334f612da (diff) | |
download | tcl-bbf9191cdf2558bb4e7571a1cf57886d79826c7e.zip tcl-bbf9191cdf2558bb4e7571a1cf57886d79826c7e.tar.gz tcl-bbf9191cdf2558bb4e7571a1cf57886d79826c7e.tar.bz2 |
Make 'clock' and 'encoding' into compilable ensembles that play with safe interps
Diffstat (limited to 'library')
-rw-r--r-- | library/init.tcl | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/library/init.tcl b/library/init.tcl index fac1722..8a680f1 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -172,13 +172,7 @@ if {[interp issafe]} { namespace eval ::tcl::clock [list variable TclLibDir $::tcl_library] - proc clock args { - namespace eval ::tcl::clock [list namespace ensemble create -command \ - [uplevel 1 [list namespace origin [lindex [info level 0] 0]]] \ - -subcommands { - add clicks format microseconds milliseconds scan seconds - }] - + proc ::tcl::initClock {} { # Auto-loading stubs for 'clock.tcl' foreach cmd {add format scan} { @@ -189,8 +183,9 @@ if {[interp issafe]} { } } - return [uplevel 1 [info level 0]] + rename ::tcl::initClock {} } + ::tcl::initClock } # Conditionalize for presence of exec. |