diff options
| author | dgp@users.sourceforge.net <dgp> | 2003-09-10 20:27:30 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2003-09-10 20:27:30 (GMT) |
| commit | 0d70876ddc50e6969f542ee8b439b1a63ae166b1 (patch) | |
| tree | 6fd5c92508da497f1276d685909ad333dcd62e99 | |
| parent | 1e4311afaa2df1035f66c1782b3e86384c656095 (diff) | |
| download | tcl-0d70876ddc50e6969f542ee8b439b1a63ae166b1.zip tcl-0d70876ddc50e6969f542ee8b439b1a63ae166b1.tar.gz tcl-0d70876ddc50e6969f542ee8b439b1a63ae166b1.tar.bz2 | |
* library/opt/optparse.tcl: Latest revisions caused [OptGuessType]
to guess "int" instead of "string" for empty strings. Missed the
required "-strict" option to [string is]. Thanks to Revar Desmera.
[Bug 803968]
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | library/opt/optparse.tcl | 6 |
2 files changed, 10 insertions, 3 deletions
@@ -1,3 +1,10 @@ +2003-09-10 Don Porter <dgp@users.sourceforge.net> + + * library/opt/optparse.tcl: Latest revisions caused [OptGuessType] + to guess "int" instead of "string" for empty strings. Missed the + required "-strict" option to [string is]. Thanks to Revar Desmera. + [Bug 803968] + 2003-09-08 David Gravereaux <davygrvy@pobox.com> * win/tclWinLoad.c (TclpDlopen): Changed the error message for diff --git a/library/opt/optparse.tcl b/library/opt/optparse.tcl index e01b7e8..4622bde 100644 --- a/library/opt/optparse.tcl +++ b/library/opt/optparse.tcl @@ -8,7 +8,7 @@ # on it. If your code does rely on this package you # may directly incorporate this code into your application. # -# RCS: @(#) $Id: optparse.tcl,v 1.9 2003/03/19 21:57:52 dgp Exp $ +# RCS: @(#) $Id: optparse.tcl,v 1.10 2003/09/10 20:27:30 dgp Exp $ package require Tcl 8.2 # When this version number changes, update the pkgIndex.tcl file @@ -816,10 +816,10 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} { if { $arg == "true" || $arg == "false" } { return boolean } - if {[string is integer $arg]} { + if {[string is integer -strict $arg]} { return int } - if {[string is double $arg]} { + if {[string is double -strict $arg]} { return float } return string |
