@@ -47,11 +47,11 @@ void git_cache_dump_stats(git_cache *cache)
4747{
4848 git_cached_obj * object ;
4949
50- if (kh_size (cache -> map ) == 0 )
50+ if (git_cache_size (cache ) == 0 )
5151 return ;
5252
53- printf ("Cache %p: %d items cached, %" PRIdZ " bytes\n" ,
54- cache , kh_size (cache -> map ), cache -> used_memory );
53+ printf ("Cache %p: %" PRIuZ " items cached, %"PRIdZ " bytes\n" ,
54+ cache , git_cache_size (cache ), cache -> used_memory );
5555
5656 kh_foreach_value (cache -> map , object , {
5757 char oid_str [9 ];
@@ -81,7 +81,7 @@ static void clear_cache(git_cache *cache)
8181{
8282 git_cached_obj * evict = NULL ;
8383
84- if (kh_size (cache -> map ) == 0 )
84+ if (git_cache_size (cache ) == 0 )
8585 return ;
8686
8787 kh_foreach_value (cache -> map , evict , {
@@ -119,7 +119,7 @@ static void cache_evict_entries(git_cache *cache)
119119 ssize_t evicted_memory = 0 ;
120120
121121 /* do not infinite loop if there's not enough entries to evict */
122- if (evict_count > kh_size (cache -> map )) {
122+ if (evict_count > git_cache_size (cache )) {
123123 clear_cache (cache );
124124 return ;
125125 }
0 commit comments