summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2017-03-14 22:22:40 (GMT)
committerKevin B Kenny <kennykb@acm.org>2017-03-14 22:22:40 (GMT)
commita3f676461cb88357d3335f2ec0a79cdeaa35eb4f (patch)
tree7060222536c985bc82a9689d4b8dae9a3e23df03 /library
parent6f905e1f0fa598055c516aa33529d41d2fadbe4a (diff)
parent607667f89dc9884c9bfb8e3c5380c9d5aa930d04 (diff)
downloadtcl-a3f676461cb88357d3335f2ec0a79cdeaa35eb4f.zip
tcl-a3f676461cb88357d3335f2ec0a79cdeaa35eb4f.tar.gz
tcl-a3f676461cb88357d3335f2ec0a79cdeaa35eb4f.tar.bz2
Make 'clock' and 'encoding' into compilable ensembles that play with safe interps
Diffstat (limited to 'library')
-rw-r--r--library/init.tcl11
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.