@@ -128,7 +128,7 @@ static void cache_evict_entries(git_cache *cache)
128128 khiter_t pos = seed ++ % git_oidmap_end (cache -> map );
129129
130130 if (git_oidmap_has_data (cache -> map , pos )) {
131- git_cached_obj * evict = kh_val (cache -> map , pos );
131+ git_cached_obj * evict = git_oidmap_value_at (cache -> map , pos );
132132
133133 evict_count -- ;
134134 evicted_memory += evict -> size ;
@@ -158,7 +158,7 @@ static void *cache_get(git_cache *cache, const git_oid *oid, unsigned int flags)
158158
159159 pos = git_oidmap_lookup_index (cache -> map , oid );
160160 if (git_oidmap_valid_index (cache -> map , pos )) {
161- entry = kh_val (cache -> map , pos );
161+ entry = git_oidmap_value_at (cache -> map , pos );
162162
163163 if (flags && entry -> flags != flags ) {
164164 entry = NULL ;
@@ -202,15 +202,15 @@ static void *cache_store(git_cache *cache, git_cached_obj *entry)
202202 pos = kh_put (oid , cache -> map , & entry -> oid , & rval );
203203 if (rval >= 0 ) {
204204 kh_key (cache -> map , pos ) = & entry -> oid ;
205- kh_val (cache -> map , pos ) = entry ;
205+ git_oidmap_value_at (cache -> map , pos ) = entry ;
206206 git_cached_obj_incref (entry );
207207 cache -> used_memory += entry -> size ;
208208 git_atomic_ssize_add (& git_cache__current_storage , (ssize_t )entry -> size );
209209 }
210210 }
211211 /* found */
212212 else {
213- git_cached_obj * stored_entry = kh_val (cache -> map , pos );
213+ git_cached_obj * stored_entry = git_oidmap_value_at (cache -> map , pos );
214214
215215 if (stored_entry -> flags == entry -> flags ) {
216216 git_cached_obj_decref (entry );
@@ -222,7 +222,7 @@ static void *cache_store(git_cache *cache, git_cached_obj *entry)
222222 git_cached_obj_incref (entry );
223223
224224 kh_key (cache -> map , pos ) = & entry -> oid ;
225- kh_val (cache -> map , pos ) = entry ;
225+ git_oidmap_value_at (cache -> map , pos ) = entry ;
226226 } else {
227227 /* NO OP */
228228 }
0 commit comments