Skip to content
Tcl Source Code History Of Ticket 219068ffffffffff
Login

History Of Ticket 219068ffffffffff

Artifacts Associated With Ticket 219068ffffffffff

  1. Ticket change [aa008fa95e] (rid 99249) by nobody on 2000-10-26 01:10:10:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 4557 RFE
      Version: 8.3
      SubmitDate: '2000-03-24'
      LastModified: '2000-05-08'
      Severity: MED
      Status: Released
      Submitter: ericm
      ChangedBy: ericm
      OS: All
      FixedDate: '2000-05-08'
      FixedInVersion: 8.4a1
      ClosedDate: '2000-10-25'
      
      
      Sometimes when I'm trying to do performance tuning on my code it's helpful to see how the hash tables I'm using are populated.  Plus, this is kind of a neat, gee-whiz function.  So, it'd be nice if Tcl_HashStats was accessible from Tcl, via "array statistics":
      
      
      *** tclVar.c    2000/01/21 03:29:14     1.16
      
      --- tclVar.c    2000/03/28 21:44:21
      
      ***************
      
      *** 2861,2870 ****
      
      
            enum {ARRAY_ANYMORE, ARRAY_DONESEARCH,  ARRAY_EXISTS, ARRAY_GET,
      
                ARRAY_NAMES, ARRAY_NEXTELEMENT, ARRAY_SET, ARRAY_SIZE,
      
      !         ARRAY_STARTSEARCH, ARRAY_UNSET}; 
      
            static char *arrayOptions[] = {
      
              "anymore", "donesearch", "exists", "get", "names", "nextelement",
      
      !       "set", "size", "startsearch", "unset", (char *) NULL
      
            };
      
      
            Interp *iPtr = (Interp *) interp;
      
      --- 2861,2870 ----
      
      
            enum {ARRAY_ANYMORE, ARRAY_DONESEARCH,  ARRAY_EXISTS, ARRAY_GET,
      
                ARRAY_NAMES, ARRAY_NEXTELEMENT, ARRAY_SET, ARRAY_SIZE,
      
      !         ARRAY_STARTSEARCH, ARRAY_STATISTICS, ARRAY_UNSET}; 
      
            static char *arrayOptions[] = {
      
              "anymore", "donesearch", "exists", "get", "names", "nextelement",
      
      !       "set", "size", "startsearch", "statistics", "unset", (char *) NULL
      
            };
      
      
            Interp *iPtr = (Interp *) interp;
      
      ***************
      
      *** 3178,3183 ****
      
      --- 3178,3198 ----
      
                  varPtr->searchPtr = searchPtr;
      
                  break;
      
              }
      
      + 
      
      +       case ARRAY_STATISTICS: {
      
      +           char *stats;
      
      +           stats = Tcl_HashStats(varPtr->value.tablePtr);
      
      +           if (stats != NULL) {
      
      +               Tcl_SetResult(interp, stats, TCL_VOLATILE);
      
      +               ckfree((void *)stats);
      
      +           } else {
      
      +               Tcl_SetResult(interp, "error reading array statistics",
      
      +                       TCL_STATIC);
      
      +               return TCL_ERROR;
      
      +           }
      
      +           break;
      
      +         }
      
      + 
      
              case ARRAY_UNSET: {
      
                  Tcl_HashSearch search;
      
                  Var *varPtr2;
      
      
      - eric
      
      
      
      
      Good thing for 8.4, but the patch is not fully correct (half missing). 
      -- 03/27/2000 hobbs
      
      Whoops -- darn cut-n'-paste.  The above patch is now complete (as far as the C source goes anyway).
      
      - eric
      
      -- 03/28/2000 ericm
      
      Done.
      
      - eric
      
      -- 05/08/2000 ericm
      
      
      
    4. foundin initialized to: "obsolete: 8.3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "07. Variables"
    10. title initialized to: "Expose Tcl_HashStats at the Tcl level"
    11. type initialized to: "Bug"
  2. Ticket change [1debf08f7a] (rid 90887) by welch on 2000-10-26 08:34:07:

    1. closedate changed to: "2000-10-26T01:34:07"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"