Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: fcf1ff56d2fdcc179c1002df7171f103f687e55d
Ticket: 219101ffffffffffffffffffffffffffffffffff
opt0.4: wrong argument order in tcl::OptProc
User & Date: nobody on 2000-10-26 01:10:45
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 5922 Bug
    Version: 8.4a1
    SubmitDate: '2000-06-20'
    LastModified: '2000-06-20'
    Severity: MED
    Status: Released
    Submitter: techsupp
    ChangedBy: ericm
    OS: Linux-SuSE
    FixedDate: '2000-06-20'
    FixedInVersion: 8.4a2
    ClosedDate: '2000-10-25'
    
    
    Name:
    
    Christian Krone
    
    
    
    ObservedBehavior:
    
    The pattern and string argument of the "string match" command are crossed.
    
    This way there may be more entries in the cache than needed.
    
    
    
    Patch:
    
    *** optparse.tcl.org    Fri Apr 16 02:47:18 1999
    
    --- optparse.tcl        Tue Jun 20 15:50:06 2000
    
    ***************
    
    *** 253,259 ****
    
      # into local variable named "Args".
    
      proc ::tcl::OptProc {name desc body} {
    
          set namespace [uplevel namespace current];
    
    !     if {   ([string match $name "::*"])
    
              || ([string compare $namespace "::"]==0)} {
    
              # absolute name or global namespace, name is the key
    
              set key $name;
    
    --- 253,259 ----
    
      # into local variable named "Args".
    
      proc ::tcl::OptProc {name desc body} {
    
          set namespace [uplevel namespace current];
    
    !     if {   ([string match "::*" $name])
    
              || ([string compare $namespace "::"]==0)} {
    
              # absolute name or global namespace, name is the key
    
              set key $name;
    
    
    
    PatchFiles:
    
    optparse.tcl
    
    
    
    
    
    Thanks for the patch.  I applied it to the sources in the CVS repository, and the fix will go out with Tcl 8.4a2.  You should note that we discourage use of the opt package in favor of the cmdline package that is part of tcllib.  cmdline is more sophisticated and reliable than opt is.  Go to http://dev.scriptics.com/software/tcllib/ for more information.  Thanks!
    
    - eric
    
    -- 06/20/2000 ericm
    
    
    
  4. foundin changed to: "obsolete: 8.4a1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "opt0.4: wrong argument order in tcl::OptProc"
  11. type changed to: "Bug"