Changeset 1897 for trunk/src/kmk/file.c


Ignore:
Timestamp:
Oct 21, 2008, 3:21:39 AM (17 years ago)
Author:
bird
Message:

kmk: added strcache2_get_ptr_hash for more efficent hashing by string pool users; replacing hash1 with that and hash2 with hash1, thus avoiding unnecessary hash2 calculations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/file.c

    r1892 r1897  
    4747  return_ISTRING_HASH_1 (((struct file const *) key)->hname);
    4848#else  /* CONFIG_WITH_STRCACHE2 */
    49   return strcache_get_hash1 (((struct file const *) key)->hname);
     49  return strcache2_get_ptr_hash (&file_cache, ((struct file const *) key)->hname);
    5050#endif /* CONFIG_WITH_STRCACHE2 */
    5151}
     
    5757  return_ISTRING_HASH_2 (((struct file const *) key)->hname);
    5858#else  /* CONFIG_WITH_STRCACHE2 */
    59   return strcache_get_hash1 (((struct file const *) key)->hname);
     59  return strcache2_get_ptr_hash (&file_cache, ((struct file const *) key)->hname);
    6060#endif /* CONFIG_WITH_STRCACHE2 */
    6161}
Note: See TracChangeset for help on using the changeset viewer.