Ignore:
Timestamp:
Oct 13, 2008, 6:35:21 AM (17 years ago)
Author:
bird
Message:

kmk: Added hash_find_slot_prehashed for the benefit of the strcache and includedep.

File:
1 edited

Legend:

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

    r1857 r1858  
    164164str_hash_1 (const void *key)
    165165{
     166#if 0
    166167#ifdef CONFIG_WITH_VALUE_LENGTH
    167168  if (MY_PREDICT_TRUE ((const char *) key == lookup_string))
    168169    return lookup_prefix->hash1;
     170#endif
    169171#endif
    170172  return_ISTRING_HASH_1 ((const char *) key);
     
    237239add_hash (const char *str, int len, unsigned long hash1, unsigned long hash2)
    238240{
    239   char *const *slot;
     241  void const **slot;
    240242  const char *key;
    241243  struct strcache_pref prefix;
     
    251253  lookup_prefix = &prefix;
    252254
    253   slot = (char *const *) hash_find_slot (&strings, str);
    254   key = *slot;
     255  slot = hash_find_slot_prehashed (&strings, str, prefix.hash1, prefix.hash2);
     256  key = *(const char **)slot;
    255257
    256258  /* Count the total number of adds we performed.  */
Note: See TracChangeset for help on using the changeset viewer.