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


Ignore:
Timestamp:
Oct 21, 2008, 5:12:16 AM (17 years ago)
Author:
bird
Message:

kmk: fix for file_cache <-> file_strcache confusion bug introduced earlier tonight.

File:
1 edited

Legend:

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

    r1898 r1901  
    4747  return_ISTRING_HASH_1 (((struct file const *) key)->hname);
    4848#else  /* CONFIG_WITH_STRCACHE2 */
    49   return strcache2_get_ptr_hash (&file_cache, ((struct file const *) key)->hname);
     49  return strcache2_get_ptr_hash (&file_strcache, ((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 strcache2_get_ptr_hash (&file_cache, ((struct file const *) key)->hname);
     59  return strcache2_get_ptr_hash (&file_strcache, ((struct file const *) key)->hname);
    6060#endif /* CONFIG_WITH_STRCACHE2 */
    6161}
     
    223223
    224224  file_key.hname = name;
     225#ifndef CONFIG_WITH_STRCACHE2
    225226  file_slot = (struct file **) hash_find_slot (&files, &file_key);
     227#else  /* CONFIG_WITH_STRCACHE2 */
     228  file_slot = (struct file **) hash_find_slot_strcached (&files, &file_key);
     229#endif /* CONFIG_WITH_STRCACHE2 */
    226230  f = *file_slot;
    227231  if (! HASH_VACANT (f) && !f->double_colon)
     
    299303  /* Find where the newly renamed file will go in the hash.  */
    300304  file_key.hname = to_hname;
     305#ifndef CONFIG_WITH_STRCACHE2
    301306  file_slot = (struct file **) hash_find_slot (&files, &file_key);
     307#else  /* CONFIG_WITH_STRCACHE2 */
     308  file_slot = (struct file **) hash_find_slot_strcached (&files, &file_key);
     309#endif /* CONFIG_WITH_STRCACHE2 */
    302310  to_file = *file_slot;
    303311
Note: See TracChangeset for help on using the changeset viewer.