Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 10e35b82b6c1856fbf25c6830defa8becb69e656
Ticket: 951168ffffffffffffffffffffffffffffffffff
strcmp in CompareStringKeys
User & Date: nobody on 2004-05-10 10:38:01
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Hi, my proposal is to use the strcmp function in tclHash.c
     for comparing two strings, instead of the custom loop: 
    this should give more options to optimize the code.
    
    Giambattista Bloisi
    
    static int
    CompareStringKeys(keyPtr, hPtr)
        VOID *keyPtr;/* New key to compare. */
        Tcl_HashEntry *hPtr;/* Existing key to 
    compare. */
    {
        register CONST char *p1 = (CONST char *) keyPtr;
        register CONST char *p2 = (CONST char *) hPtr-
    >key.string;
    
    if (strcmp(p1, p2) == 0) {
    return 1;
    }
    
        return 0;
    }
    
  4. foundin changed to: "None"
  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: "None"
  10. title changed to: "strcmp in CompareStringKeys"
  11. type changed to: "RFE"