diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2006-10-23 22:49:24 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2006-10-23 22:49:24 (GMT) |
commit | 94919dd9c565db95ae21cf14b91f8cdeb2446b46 (patch) | |
tree | 5b48faeb4f251c92945b7f4621754d51b85e3817 /library | |
parent | ff4058f01143ad058843bf7e6f0a0ff599a4ac50 (diff) | |
download | tcl-94919dd9c565db95ae21cf14b91f8cdeb2446b46.zip tcl-94919dd9c565db95ae21cf14b91f8cdeb2446b46.tar.gz tcl-94919dd9c565db95ae21cf14b91f8cdeb2446b46.tar.bz2 |
* library/clock.tcl (format, scan): corrected wrong # args
* tests/clock.test (3.1, 34.1): messages to make use of the
new rewrite capabilities of [info level]
* generic/tcl.h: Lets TEOV update the iPtr->objc/objv
* generic/tclBasic.c: fields, except when the (new) flag bit
* generic/tclInt.h: TCL_EVAL_NOREWRITE is present. This
* generic/tclNamesp.c: causes [info level] to know and use
* generic/tclProc.c: ensemble rewrites [Bug 1577492]
* tests/namespace.test:
***POTENTIAL INCOMPATIBILITY***
The return value from [info level 0] on interp alias calls is
changed: previously returned the target command (including curried
values), now returns the source - what was actually called.
Diffstat (limited to 'library')
-rw-r--r-- | library/clock.tcl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/library/clock.tcl b/library/clock.tcl index ab60089..61f905b 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.35 2006/08/24 21:47:49 kennykb Exp $ +# RCS: @(#) $Id: clock.tcl,v 1.36 2006/10/23 22:49:25 msofer Exp $ # #---------------------------------------------------------------------- @@ -653,10 +653,11 @@ proc ::tcl::clock::format { args } { # Check the count of args if { [llength $args] < 1 || [llength $args] % 2 != 1 } { + set cmdName [lrange [info level 0] 0 end-[llength $args]] return -code error \ -errorcode [list CLOCK wrongNumArgs] \ "wrong \# args: should be\ - \"[lindex [info level 0] 0] clockval\ + \"$cmdName clockval\ ?-format string? ?-gmt boolean?\ ?-locale LOCALE? ?-timezone ZONE?\"" } @@ -1243,10 +1244,11 @@ proc ::tcl::clock::scan { args } { # Check the count of args if { [llength $args] < 1 || [llength $args] % 2 != 1 } { + set cmdName [lrange [info level 0] 0 end-[llength $args]] return -code error \ -errorcode [list CLOCK wrongNumArgs] \ "wrong \# args: should be\ - \"[lindex [info level 0] 0] string\ + \"$cmdName string\ ?-base seconds?\ ?-format string? ?-gmt boolean?\ ?-locale LOCALE? ?-timezone ZONE?\"" |