Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7d188719707d7dbaf4e2fcba8c459a01b9c94a72
Ticket: 1710795fffffffffffffffffffffffffffffffff
First|Next|Done docs are confusing
User & Date: dgp on 2007-05-01 20:28:15
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    The Tcl_DictObj(First|Next|Done) routines
    are offered to manage an iteration through
    the contents of a dictionary.
    
    The documentation says:
    
    "The donePtr argument points to a variable that is
    updated to be zero  of there are further key/value
    pairs to be iterated over, or non-zero if the
    iteration is complete."
    
    I interpret that to mean a result of (*donePtr = 1)
    means the next call to Tcl_DictObjNext would fail
    to return anything, so it need not be made.
    
    That's not what the implementation does.
    
    The implementation has (*donePtr = 1) means that
    the current call did not return anything.
    
    Either scheme is workable, but the docs need
    to be more clear.  Confusion about whether/when
    Tcl_DictObjDone() needs to be called caused
    Tcl Bug 1710709.
    
    
  4. foundin changed to: "obsolete: 8.5a6"
  5. is_private changed to: "0"
  6. priority changed to: "7 High"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "dgp"
  10. subsystem changed to: "15. Dict Object"
  11. title changed to: "First|Next|Done docs are confusing"
  12. type changed to: "Bug"